how do I get the IP of incoming ICMP due to UDP-send to dead client in Ruby?

Posted by banister on Stack Overflow See other posts from Stack Overflow or by banister
Published on 2010-12-31T02:21:56Z Indexed on 2010/12/31 2:54 UTC
Read the original article Hit count: 268

Filed under:
|
|
|
|

so.. I'm doing a small multiplayer game with blocking UDP and IO.select. To my problem.. (In the server) reading from a UDP socket (packet, sender = @socket.recvfrom(1000)) which have just sent a packet to a dead client results in a ICMP unreachable (and exception Errno::ECONNRESET in ruby). The problem is that I can't find any way whatsoever to extract the IP of that ICMP.. so I can clean out that dead client.

Anyone know how to achieve this?

thanks

© Stack Overflow or respective owner

Related posts about ruby

Related posts about networking