Re: Cocoa and Telnet
Re: Cocoa and Telnet
- Subject: Re: Cocoa and Telnet
- From: Mark Dalrymple <email@hidden>
- Date: Thu, 24 Apr 2003 09:53:27 -0400
Hi David,
> I need to connect to a Telnet session which streams data to me.
Telnet fundamentally just opens a TCP connection and then reads and
writes bytes through it. You can do the same thing with your
networking APIs of choice (Berkeley sockets, SmallSockets,
OmniNetworking, and there's probably some CF* stuff I'm forgetting
about).
For instance you could use Berkeley sockets to create the connection,
then wrap an NSFileHandle around the socket file descriptor and use
that do to reading and writing. I threw together a quick sample that
uses sockets and NSFileHandle to write an HTTP request and read the
result, but it could be extended to read for username and password
prompts and write back the appropriate data. The sample is at
http://borkware.com/quickies/one?topic=Samples
Cheers,
++Mark Dalrymple, email@hidden
http://borkware.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.