From: David Holroyd Date: 2005-05-24T18:16:05+09:00 Subject: Re: UDP select()/recvfrom() delay under Windows? On Tue, May 24, 2005 at 02:05:17PM +0900, Ville Mattila wrote: > David Holroyd writes: > > When I run my test code in ruby 1.8.2 (2004-12-25) [i386-mswin32], I > > see, for example: > > > > > > I notice that there is a gap of some several seconds between select() > > completing, and recvfrom() completing -- I expected that, since select() > > reports data can be read, recvfrom() should not block. Am I wrong? > > I think this will be fixed in 1.8.3 so you could try it. There is a 1.8.3rc1 > available at www.ruby-lang.org. You have to compile it your self though. I don't have MSVC++, so I downloaded ruby-1.8.3-preview1-i386-mswin32.zip from http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html and unpacked that over the top of the install directory created by ruby182-15.exe. Using ruby 1.8.3 (2005-05-12) [i386-mswin32], I still see recvfrom() block for 4-5 seconds each time it's called. Oddly, when I access the server off-site, using a tunnel, there's no delay (i.e. when the Ruby program is configured to connect to the tunnel endpoint on localhost, rather than directly to the server machine). dave -- http://david.holroyd.me.uk/