pphaneuf: (Default)
[personal profile] pphaneuf
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.

Re: You forgot to take into account this:

Date: 2008-05-24 05:58 am (UTC)
From: [identity profile] skjalm.livejournal.com
I'm sure someone could come up with some really bad jokes that involve blocking her I/O ports...

don't be evil

Date: 2008-05-27 11:35 am (UTC)
From: [identity profile] muadda.livejournal.com
damn... first, threads, and now, blocking socket and synchronization with timeouts... I don't recognize you, Pierre! :-)

February 2016

S M T W T F S
 123456
7891011 1213
14151617181920
21222324252627
2829     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 20th, 2026 09:31 pm
Powered by Dreamwidth Studios