 |
 |
Networking in Cocoa...
|
 |
|
 |
|
Junior Member
Join Date: Oct 2001
Location: UCI
Status:
Offline
|
|
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
|
|
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.)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
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.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Oct 2001
Location: UCI
Status:
Offline
|
|
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
|
|
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.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |