Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Networking in Cocoa...

Networking in Cocoa...
Thread Tools
Junior Member
Join Date: Oct 2001
Location: UCI
Status: Offline
Reply With Quote
May 1, 2002, 01:17 AM
 
The ADC has sparse information on this topic, unfortunately. I'm making a command-line program that will interface with servers through telnet. I've been looking for code that allows me to use telnet in my application, or at least invoke it as a seperate process and control input/monitor output. Any ideas guys?
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 1, 2002, 03:18 AM
 
Foundation doesn't really offer much in the way of socket abstractions. If you look at a lower level, you'll find CFSocket and CFNetwork, which might be able to help. Or at a higher level, there's the OmniNetworking open-source framework, that provides that and a lot more in a multithreaded architecture. (End shameless plug.)
Rick Roe
icons.cx | weblog
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
May 1, 2002, 12:01 PM
 
When I needed some sort of network abstraction layer in a recent project I used Small Sockets. It is pretty nice and is rather simple since it only acts as an abstraction layer over BSD TCP sockets. It is pretty straight forward.

I haven't used Omni Networking so I don't know how they compare.

Hope that helps,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Mr.E  (op)
Junior Member
Join Date: Oct 2001
Location: UCI
Status: Offline
Reply With Quote
May 1, 2002, 11:53 PM
 
Small Sockets is working dandy for sending data though telnet. However, receiving is another issue. What port does my machine contact telnet servers with? Is it random? If so, is there a function to find out?
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
May 2, 2002, 09:09 AM
 
It is pretty much random. I think that Small Sockets has a method that you can send to a socket object instance to ask it what its local port is. I can't really remember, though. Look at their API because I am pretty sure that there is something to do that.

Hope that helps,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2