From: Francis Cianfrocca Date: 2006-06-21T05:13:53+09:00 Subject: Re: How to get the response from a UDP socket. ------=_Part_2350_29003854.1150834430891 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > > >>> > That's a good point, but the OP seemed to have a fixed port in mind that > the remote socket would reply to (port 5000). Maybe the remote process > doesn't use the sender's address. I can only guess... > <<< Revised version that assumes the server will reply to port 5000: u = UDPSocket.new u.bind( client_ip_address, 5000 ) # This is the only change. u.send( "UDP Message", 0, server_ip_address, server_port) response = u.recv(4096) Observe, you can't specify nil as the bind-address, as the OP did. ------=_Part_2350_29003854.1150834430891--