Re: CFSocket callback question
Re: CFSocket callback question
- Subject: Re: CFSocket callback question
- From: Douglas Davidson <email@hidden>
- Date: Tue, 5 Apr 2005 15:20:22 -0700
On Apr 5, 2005, at 2:41 PM, Ken Baer wrote: I have a question regarding the network messages that are interpreted by the callback function set up when you create a new CFSocket. I have been using the kCFSocketDataCallBack callback type to read incoming data. I save that data, send a message and process that data. But what is the kCFSocketReadCallBack callback type used for? This has never been very clear to me. Can someone help enlighten me on this? Thanks.
kCFSocketDataCallBack and kCFSocketReadCallBack are mutually exclusive. If you use kCFSocketDataCallBack, then CFSocket will read the data from the socket and present it to you. If you use kCFSocketReadCallBack, then CFSocket will simply notify you when data is available to be read; you then read it from the socket yourself. Note that if it is automatically reenabled (as it is by default) then kCFSocketReadCallBack will continue to be sent as long as there is data available to be read.
See the header comments in CFSocket.h for more information.
Douglas Davidson |
_______________________________________________
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