Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Not getting WSAECONNRESET when calling sendto on unavailable port

37 views
Skip to first unread message

andy.y...@gmail.com

unread,
Oct 13, 2011, 4:12:56 PM10/13/11
to
Hi,

I have a non-block UDP client socket, I call sendto to send packet to
a remote peer that took the port down. But the sendto always succeeds
with the number of bytes sent, not ICMP port unreachable message
(WSAECONNRESET), from the wireshark, I can see the ICMP port
unreachable message was sent back. But the sendto always succeeds. Any
ideas, TIA.

-Andy

andy.y...@gmail.com

unread,
Oct 13, 2011, 4:22:20 PM10/13/11
to
On Oct 13, 3:12 pm, "andy.y.hu...@gmail.com" <andy.y.hu...@gmail.com>
wrote:

BTW, I bind the socket to the local interface.

-Andy

Len Holgate

unread,
Oct 28, 2011, 4:30:54 AM10/28/11
to
Andy,

I've written about this here:
http://www.lenholgate.com/blog/2007/12/bug-in-overlapped-udp-port-unreachable-errors.html

short of listening to the icmp messages directly, I dont think there's
a solution.

Len

On Oct 13, 9:22 pm, "andy.y.hu...@gmail.com" <andy.y.hu...@gmail.com>
wrote:
0 new messages