L
leon breedt
hi,
maybe i'm understanding how this is meant to work incorrectly, but i
would have assumed TCPServer#accept would return immediately if i had
set it to nonblocking. the accept syscall on Linux would not have
blocked, according to the manpage..
require 'socket'
require 'io/nonblock'
s = TCPServer.new('localhost', 9000)
s.nonblock = true
s.accept
$stderr.puts "returned"
when i run this in a test script, accept blocks.
$ ruby -v
ruby 1.8.2 (2004-08-24) [i386-linux]
leon
maybe i'm understanding how this is meant to work incorrectly, but i
would have assumed TCPServer#accept would return immediately if i had
set it to nonblocking. the accept syscall on Linux would not have
blocked, according to the manpage..
require 'socket'
require 'io/nonblock'
s = TCPServer.new('localhost', 9000)
s.nonblock = true
s.accept
$stderr.puts "returned"
when i run this in a test script, accept blocks.
$ ruby -v
ruby 1.8.2 (2004-08-24) [i386-linux]
leon