Microsoft KB Archive/140014

{|
 * width="100%"|

PRB: Connect Fails, WSAGetLastError returns WSAENETUNREACH

 * }

Q140014

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), version 3.51

-

SYMPTOMS
A Win32 Winsock client issues a connect call over SPX or SPXII protocols and the call fails with SOCKET_ERROR with WSAGetLastError returning error WSAENETUNREACH(10051).

CAUSE
Either the IPX network number specified in the SOCKADDR_IPX address structure for the server is incorrect (network unreachable), or the server is not listening on the specified socket number.

STATUS
This behavior is by design.

MORE INFORMATION
If a Win32 Winsock clients issues a connect call over TCP/IP protocol for a server and the server is not listening on the specified port, connect returns SOCKET_ERROR and WSAGetLastError returns error WSAECONNREFUSED(10061). However, the IPX/SPX implementation of Windows sockets on the Windows NT platform returns error WSAENETUNREACH for the same scenario.

Keywords : kbnetwork kbAPI kbOSWinNT351 kbSDKPlatform kbWinsock kbGrpDSNet

Issue type : kbprb

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32SDK351