Re: Socket read tuning on Mac OS X
Re: Socket read tuning on Mac OS X
- Subject: Re: Socket read tuning on Mac OS X
- From: Mo McRoberts <email@hidden>
- Date: Fri, 2 Apr 2010 15:43:51 +0100
On Fri, Apr 2, 2010 at 15:18, Jakub Bednar <email@hidden> wrote:
"Give me about xxx kB of data per read, but if
> that amount is not available in a specified time, give me what you have."?
ioctl(fd, FIONREAD, &nbytes) in combination with a short sleep,
perhaps? i.e., if nbytes is below the threshold, sleep for a short
period and test again, if it's increased but still below the
threshold, continue sleeping; if it's unchanged or above the
threshold, read what's there
dirty hack, though.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden