Timeouts In Blocking Socket Code

May 23, 2008 18:28

I 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.

syndicated, tech

Leave a comment

Comments 2

You forgot to take into account this: azrhey May 24 2008, 01:54:09 UTC

... )

Reply


don't be evil muadda May 27 2008, 11:35:03 UTC
damn... first, threads, and now, blocking socket and synchronization with timeouts... I don't recognize you, Pierre! :-)

Reply


Leave a comment

Up