• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with Connect to Telnet Server code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Help with Connect to Telnet Server code (From: Adam <email@hidden>)

  • Prev by Date: App doesn't know it's launched... (Dock icon bouncing)
  • Next by Date: Re: CURS ressources on OS X
  • Previous by thread: Re: Help with Connect to Telnet Server code
  • Next by thread: [OT] Bug Reporter Questions
  • Index(es):
    • Date
    • Thread