• 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: Cocoa-dev Digest, Vol 6, Issue 1522
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 6, Issue 1522


  • Subject: Re: Cocoa-dev Digest, Vol 6, Issue 1522
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 21 Oct 2009 21:22:07 -0700

OK, the reason reading data doesn't work is because you aren't waiting for the delegate calls to tell you that data is available; you're just opening the stream and then immediately trying to read. It takes time to open a socket and receive data over it.

You should really read the conceptual overview docs for Cocoa streams before going any further. They include snippets showing how the delegate calls work. Also, the sample code CocoaEcho shows how to write a TCP client app that connects to a server and receives data.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Cocoa-dev Digest, Vol 6, Issue 1522 (From: Ashley Perrien <email@hidden>)

  • Prev by Date: Interface Builder 3.2 Release Notes
  • Next by Date: Re: NSInputStream / Eventqueue / run in Background
  • Previous by thread: Re: Cocoa-dev Digest, Vol 6, Issue 1522
  • Next by thread: Re: Cocoa-dev Digest, Vol 6, Issue 1522
  • Index(es):
    • Date
    • Thread