From: Joel VanderWerf Date: 2006-06-20T07:40:49+09:00 Subject: Re: How to get the response from a UDP socket. Hamid Rasoulian wrote: > sock.bind($IP1 , $port1) ... > server.bind(nil, $port1) Two sockets can't bind to the same port. This raises the error: Errno::EADDRINUSE: Address already in use - bind(2) You aren't seeing the error because it's raised in a thread. There are three ways around this: 1. set Thread.current.abort_on_exception=true inside the server thread 2. set Thread.abort_on_exception=true gloablly. 3. put a begin-rescue-end clause around the whole thread code (inside the Thread.start block). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407