From: chrisf@... (Chris Fulmer) Date: 2001-09-11T21:34:41+09:00 Subject: [ruby-talk:21126] Problem using udp in WinNT So, the following program, copied almost verbatim from the "Programming Ruby" web site performs differently when run in Linux vs WinNT: require 'socket' $port = 32000 sThread=Thread.start do server = UDPSocket.new server.bind(nil,$port) print "Bound\n" 2.times { p server.recvfrom(64) } end sleep 3 UDPSocket.open.send("ad hoc",0,'10.15.25.35',$port) sock=UDPSocket.open sock.connect('localhost', $port) sock.send("connection-based",0) SThread.join (10.15.25.35 is the IP address of the machine running the test.) In WinNT, if I replace the IP address with 'localhost', it runs fine. In Linux, it works fine as-is. I'm using Ruby on top of cygwin. Any clues? thx. -- Chris Fulmer chrisf@XXXX_nortelnetworks_XXXXX.com (Change to obvious to e-mail back)