From: Francis Cianfrocca Date: 2006-06-21T03:38:26+09:00 Subject: Re: How to get the response from a UDP socket. ------=_Part_985_28690109.1150828703243 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Joel: So you think that all of the OP's code is client-side code? And he's just using the word "server_thread" to indicate that he's looking for a response on that thread, not that it's on the server? If that's true, then he can dispense with the thread, the bind and the connect, provided he knows how the "device" is sending a response packet to him. Many services that accept UDP requests will return responses to the same address and port that the requests came from. (This is usually an ephemeral port.) Some services (like NTP) send responses to a well-known port, to which the client must bind. Assuming the former, this code should work: u = UDPSocket.new u.send( "UDP Message", 0, server_ip_address, server_port) response = u.recv(4096) ------=_Part_985_28690109.1150828703243--