Works fine. It's not a ruby-specific issue. You have to remember to set the
accepting socket non-blocking, and then be aware that it may return EAGAIN
(or whatever your platform-specific equivalent is) even if it selected
readable.
(This was two days ago and now I can't remember the context this came up
in. Were we talking about apps that prefer to use blocking i/o?)
···
On 5/11/06, Sam Roberts <sroberts@uniserve.com> wrote:
Quoting garbagecat10@gmail.com, on Tue, May 09, 2006 at 04:09:20AM +0900:
> has relatively light requirements. You may find this odd but I worry
more
> about accepts blocking than writes. An accepting socket can select
readable
> (meaning a new connection is available), but be empty by the time you
get
> around to reading it (like if there was a network error that caused a
> pending connection to reset). This can be a real nasty.Stevens describes this problem, but I thought he also described the fix,
set the socket to non-blocking so the accept() won't block.doesn't this work? is this a ruby-specific problem?
Sam