From: Francis Cianfrocca Date: 2007-08-28T21:12:12+09:00 Subject: Re: non-blocking socket in Ruby 1.8.4? ------=_Part_19274_9094593.1188303129725 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/27/07, yermej@gmail.com wrote: > > I'm using Ruby 1.8.4 on Linux and I'm having trouble with non-blocking > sockets. Socket#accept_nonblock doesn't exist and using fcntl to set > O_NONBLOCK before calling accept doesn't seem to work. I've tried with > TCPServer and Socket and accept blocks in both cases. What's the 1.8.4 > way to get non-blocking sockets? > > Some sample code: Update to a newer Ruby and use accept_nonblock. As an alternative, look at Ruby/EventMachine. ------=_Part_19274_9094593.1188303129725--