Timeouts In Blocking Socket Code
May. 23rd, 2008 06:28 pmI was wondering how to handle timeouts correctly while blocked for I/O on sockets, with as few system calls as possible.
Thanks to slamb for reminding me of SO_SNDTIMEO/SO_RCVTIMEO! Combined with recv() letting me do short reads, I think I've got what I need for something completely portable.
Thanks to slamb for reminding me of SO_SNDTIMEO/SO_RCVTIMEO! Combined with recv() letting me do short reads, I think I've got what I need for something completely portable.
You forgot to take into account this:
Date: 2008-05-24 01:54 am (UTC)Re: You forgot to take into account this:
Date: 2008-05-24 05:58 am (UTC)don't be evil
Date: 2008-05-27 11:35 am (UTC)