INFO: Winsock Ignores ICMP Port Unreachable Control Messages

Article translations Article translations
Article ID: 245442 - View products that this article applies to.
This article was previously published under Q245442
Expand all | Collapse all


ICMP Port Unreachable control messages are ignored by the Winsock layer on versions of Windows as specified applies to section. If Winsock UDP application is sending datagram to a host application that has already gone, the host replies with ICMP Port Unreachable control message. If the Winsock application is then blocking on receiving datagram from the peer, it will not unblock on receiving the ICMP Port Unreachable control message. If the application needs to detect the existence of the UDP peer under such scenarios, it may use nonblocking socket or overlapped socket with timeout and retries.


On Windows 2000, a feature is added to unblock Winsock application and returning 10054 (WSA_ECONNRESET) through WSAGetLastError if ICMP Host Unreachable control message is received for a bound socket.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
263823 WinSock Recvfrom() Now Returns WSAECONNRESET Instead of Blocking or Timing Out


Article ID: 245442 - Last Review: January 25, 2007 - Revision: 2.3
  • Microsoft Windows NT Advanced Server 3.1
  • Microsoft Windows NT Server 3.5
  • Microsoft Windows NT Server 3.51
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 3.1
  • Microsoft Windows NT Workstation 3.5
  • Microsoft Windows NT Workstation 3.51
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows 95
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 98 Second Edition
kbdswnet2003swept kbapi kbinfo kbnetwork kbwinsock KB245442

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from