Re: Help with Connect to Telnet Server code
Re: Help with Connect to Telnet Server code
- Subject: Re: Help with Connect to Telnet Server code
- From: Chris Hanson <email@hidden>
- Date: Sat, 17 Apr 2004 19:59:21 -0700
If you're running on Panther, you might also want to check out the
NSStream classes. They work pretty well in combination with
networking, and integrate well with the runloop and delegate design
patterns used extensively in Cocoa.
In particular, check out the class method +[NSStream
getStreamsToHost:port:inputStream:outputStream:]. You can use this to
create a pair of streams to a given host, set an object of your own as
their delegate, and then register the streams on the main run loop.
The streams will then send your object -stream:handleEvent: whenever an
event occurs on them (like an error, or data becoming available, or
flow control being lifted).
-- Chris
--
Chris Hanson <email@hidden>
http://www.livejournal.com/users/chanson/
_______________________________________________
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.