Re: Altering CFSocket Callback Behavior
Re: Altering CFSocket Callback Behavior
- Subject: Re: Altering CFSocket Callback Behavior
- From: Douglas Davidson <email@hidden>
- Date: Mon, 17 Feb 2003 09:41:42 -0800
On Saturday, February 15, 2003, at 12:02 PM, Brian Victor wrote:
I have been successful in using CFSocket for a minimal select()-style
wrapper around the unix socket interface. But it seems that the read
callback is called when there is any data in the buffer, rather then
when new data comes in.
This is how select() works. Why are you surprised?
If you want the callbacks to cease, you can (a) read the data, or (b)
turn them off temporarily until you are ready to handle more data,
using the CFSocket enable/disable functions. We don't have an
edge-triggered mode, although you can use kCFSocketDataCallBack to give
you something like it, if you don't need to do the actual reading
yourself.
Douglas Davidson
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.