Re: Cocoa-dev Digest, Vol 6, Issue 1522
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