Re: Not Automatically Registering Read Interest on CFSocket
Re: Not Automatically Registering Read Interest on CFSocket
- Subject: Re: Not Automatically Registering Read Interest on CFSocket
- From: Josh Graessley <email@hidden>
- Date: Sun, 25 Mar 2007 01:17:17 -0700
On Mar 24, 2007, at 9:58 PM, King Chung Huang wrote:
Hi,
I'm not having much luck with the search interface at
lists.apple.com, so I apologize if this has been answered before!
I'm reading data from a socket using CFSocket's API. Is there a way
to configure it to not automatically call my CallBack function for
kCFSocketReadCallBack when I've read some number of bytes and
there's still more bytes to read? i.e., I call
CFSocketEnableCallBacks(...) with kCFSocketReadCallBack, my call
back function gets invoked, and I read some data, but I'm not
interested in receiving further data until a future time. I could
call CFSocketDisableCallBacks(...) every time, but is there a way
for the socket to simply default to not calling me again until I
signal that I'm interested in receiving data again using
CFSocketEnableCallBacks(...)?
I don't remember the details but there is a flag you can use that
will require you to enable the callbacks every time you want to get
them.
Look in to CFSocketSetSocketFlags.
-josh
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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