Re: FD_CLOSE event occurs on a socket
Re: FD_CLOSE event occurs on a socket
- Subject: Re: FD_CLOSE event occurs on a socket
- From: Jeremy Wyld <email@hidden>
- Date: Thu, 9 Dec 2004 10:54:30 -0800
Are you using CFSocket or CFStreams?
With CFSocket, you'll get a return value of zero on your call to recv
or read after you've been signaled with the kCFSocketReadCallBack
event.
For CFStreams, CFReadStreamRead or CFWriteStreamWrite will return zero.
If the end is encountered by the underlying stream implementation
prior to read or write on an event-based stream, you would receive a
kCFStreamStatusAtEnd event. This of course would only happen if all
the bytes had been exhausted from the stream. In other words, you
won't receive an end event followed by read/write events.
jeremy
On Dec 6, 2004, at 10:03 PM, Alex Guo wrote:
Hi, All,
How do I know that FD_CLOSE event occurs on a socket ? Anybody can
help me?
Thanks,
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden