Winsock Error Codes - Brought to you by Winsock-Error.com

10057 "Socket is not connected."

WSAENOTCONN (Winsock error number: 10057)

Microsoft say this about Winsock error 10057 - WSAENOTCONN:

A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied. Any other type of operation might also return this error—for example, setsockopt setting SO_KEEPALIVE if the connection has been reset.

Full details of Winsock TCP error 10057 - WSAENOTCONN:

Berkeley description: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket) no address was supplied.

WinSock description: Same as Berkeley, and then some. An application attempted an input/output network function call before establishing an association with a remote socket (i.e. before calling connect() or accept()). It also has a specific meaning for setsockopt().

Detailed description:

setsockopt(): WinSock generates this error if you try to set SO_KEEPALIVE but the connection has already been aborted (e.g. a TCP reset received from remote host).

   
This page is designed to help you to understand Winsock TCP error 10057. It will not necessarily mean you can instantly fix issues when your computer tells you that Winsock is having problems with code 10057, rather it will give you the necessary background information to help solve the matter.

Programming declarations for 10057 (WSAENOTCONN):

C#
long WSAENOTCONN = 10057 ;

VB.net
Dim WSAENOTCONN As Long = 10057

VB6
Dim WSAENOTCONN As Long
WSAENOTCONN = 10057