From: Seth Kurtzberg Date: 2003-03-03T13:08:14+09:00 Subject: Re: Unable to do non-blocking read on socket Matz, I tracked down one reason why we are seeing different behavior. I was following the documentation which specifies that the Fcntl constants should be used on an fcntl call (which does seem reasonable). In addition, the the socket source file in Ruby, O_NDELAY is also used. You are using File::NONBLOCK. And, indeed, File::NONBLOCK appears to work. I am still testing so I will let you know if I run into anything else. On Sunday 02 March 2003 02:27 am, nobu.nokada@softhome.net wrote: > Hi, > > At Fri, 28 Feb 2003 01:12:07 +0900, > > Seth Kurtzberg wrote: > > This is with 1.8 CVS head on linux kernel 2.4.20. > > EAGAIN/EWOULDBLOCK should be handled in 1.8, IO#read with no > arguments for non-blocking IO doesn't wait unreceived data. > > $ ruby server.rb foo & > [1] 13697 > > $ ruby client.rb foo > "" > > $ ruby client.rb foo 3 > "hello," > > $ ruby client.rb foo 5 > "hello, world" -- Seth Kurtzberg M. I. S. Corp. 480-661-1849 seth@cql.com