Winrt DatagramSocket can't receive any message after a few icmp error, what's the problem? RRS feed

  • General discussion

  • I use DatagramSocket in non-connect mode, that is it will send_to and recv_from packet multiple peer. I am not sure the dest peer is on line, so the DatagramSocket is keeping notified with icmp errors (Destination unreachable, Port unreachable), a few time later, the MessageReceived event stop raise to my applicaton.

    I am almost sure that the icmp error damaged the the DatagramSocket's recv process, I use a simple daemon to certify this. My daemon is a simple TFTP client, when downloading file data from TFTP server, some extra udp packet is sent to another peer. When the peer returns nothing, the downloading finish ok, but when the peer returns icmp "Port unreachable", the downloading stops after a few seconds, at the same time, the wireshark shows TFTP server resend the last block for 3 times, but then DatagramSocket receives none.

    Friday, January 4, 2013 2:51 AM