Re: Socket read tuning on Mac OS X
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Fri, Apr 2, 2010 at 15:18, Jakub Bednar <jakub.bednar@avg.com> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Mo McRoberts