Hello,
here is what I'm trying to do, unfortunately this block on
"getting connection" line. I have probably misundestood Thread handling.
Could someone ligthen me? Ruby is 1.6.4 and the platform is Win2000.



$th = nil
PORT=6666

s = TCPServer.new('localhost', PORT)
$th = Thread.new {
  puts "getting connection"
  Thread.pass
  session = s.accept
  puts "got connection", session.gets() 
}
cs = TCPSocket.new('localhost', PORT);
cs.print "foobar"
$th.join
exit(1)