Re: NSFileHandle socket question
Re: NSFileHandle socket question
- Subject: Re: NSFileHandle socket question
- From: Dustin Mierau <email@hidden>
- Date: Sun, 23 Dec 2001 20:40:57 -0800
Doug,
I think this works the same way recv() does, if you a size of 0 is
passed to your callback, the connection has closed. You might just want
to use the socket api directly and skip the NSFileHandle stuff, it will
give you a little more flexibility.
-dustin
On Sunday, December 23, 2001, at 05:31 PM, Doug Brown wrote:
Hi,
I have been working on creating a socket for an app that I'm working
on, and NSFileHandle seems to be the perfect way to handle sending and
receiving data - it's working just great with
-readInBackgroundAndNotify. I am baffled at one thing, though. How do I
find out if the remote side closed the connection? I don't see any
method or notification that would tell me when the connection is
closed. I need to know this so I can tell the user that the connection
was dropped and reset everything so the app knows it is disconnected
from the server again. Thanks,
Doug
_______________________________________________
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.