Winsock Error Codes

The following list identifies the Winsock error codes. These values are used by the WSAGetLastError function to report and identify errors caused by other Winsock functions.

The following Winsock error codes are listed in ascending numerical order.

WSAEINTR (10004)
Interrupted Function Call -- A blocking operation was cancelled.
WSAEACCESS (10013)
Permission Denied -- An attempt to access a socket was forbidden by its access permissions.
WSAEFAULT (10014)
Bad Address -- An invalid pointer address was specified in a function call.
WSAEINVAL (10022)
Invalid Argument -- An invalid argument was passed to a function.
WSAEMFILE (10024)
Too Many Open Files -- There are too many open sockets.
WSAEWOULDBLOCK (10035)
Resource Temporarily Unavailable -- The specified socket operation cannot be completed immediately, but the operation should be retried later.
WSAEINPROGRESS (10036)
Operation Now in Progress -- A blocking operation is currently executing.
WSAEALREADY (10037)
Operation Already in Progress -- An operation was attempted on a non-binding socket that alredy had an operation in progress.
WSAENOTSOCK (10038)
Socket Operation on Non-Socket -- An operation was attempted on something that is not a socket.
WSAEDESTADDRREQ (10039)
Destination Address Required -- A required address was omitted from a socket operation.
WSAEMSGSIZE (10040)
Message Too Long -- A message was sent on a datagram socket that exceeds the internal message buffer or some other limit.
WSAEPROTOTYPE (10041)
Protocol Wrong Type for Socket -- A protocol was specified that is not supported by the target socket.
WSAENOPROTOOPT (10042)
Bad Protocol Option -- An unknown, invalid, or unsupported protocol option or leel was specified.
WSAEPROTONOSUPPORT (10043)
Protocol Not Supported -- The specified protocol is not supported or is not implemented.
WSAESOCKTNOSUPPORT (10044)
Socket Type Not Supported -- The specified socket type is not supported in the address family.
WSAEOPNOTSUPP (10045)
Operation Not Supported -- The specified operation is not supported by the referenced object.
WSAEPFNOSUPPORT (10046)
Protocol Family Not Supported -- The specified protocol family is not supported or is not implemented.
WSAEAFNOSUPPORT (10047)
Address Family Not Supported by Protocol Family -- An address incompatible with the requested network protocol was used.
WSAEADDRINUSE (10048)
Address Already in Use -- An attempt to use the same IP address and port with two different sockets simultaneously was made.
WSAEADDRNOTAVAIL (10049)
Cannot Assign Requested Address -- The requested address is not valid (given the context of the function).
WSAENETDOWN (10050)
Network is Down -- A socket operation encountered a network that is down.
WSAENETUNREACH (10051)
Network is Unreachable -- A socket operation encountered an unreachable network.
WSAENETRESET (10052)
Network Dropped Connection on Reset -- A connection was broken due to "keep-alive" activity detecting a failure.
WSAECONNABORTED (10053)
Software Caused Connection Abort -- A connection was aborted by software on the host computer.
WSAECONNRESET (10054)
Connection Reset by Peer -- A connection was forcibly closed by the remote host.
WSAENOBUFS (10055)
No Buffer Space Available -- A socket operation could not be performed because the system ran out of buffer space or the queue was full.
WSAEISCONN (10056)
Socket is Already Connected -- A connect request was made on a socket that is already connected.
WSAENOTCONN (10057)
Socket is Not Connected -- An attempt to send or receive data failed because the socket is not connected.
WSAESHUTDOWN (10058)
Cannot Send After Socket Shutdown -- An attempt to send or receive data failed because the socket has already been shut down.
WSAETIMEDOUT (10060)
Connection Timed Out -- The remote host failed to respond within the timeout period.
WSAECONNREFUSED (10061)
Connection Refused -- The target machine actively refused the attempt to connect to it.
WSAEHOSTDOWN (10064)
Host is Down -- The destination host is down.
WSAEHOSTUNREACH (10065)
No Route to Host -- The destination host is unreachable.
WSAEPROCLIM (10067)
Too Many Processes -- The Winsock implementation has exceeded the number of applications that can use it simultaneously.
WSASYSNOTREADY (10091)
Network Subsystem is Unavailable -- The underlying system to provide network services is unavailable.
WSAVERNOTSUPPORTED (10092)
winsock.dll Version Out of Range -- The Winsock implementation does not support the requested Winsock version.
WSANOTINITIALIZED (10093)
Successful WSAStartup Not Yet Performed -- The calling application has not successfully called WSAStartup to initiate a Winsock session.
WSAEDISCON (10094)
Graceful Shutdown in Progress -- The remote party has initiated a graceful shutdown sequence.
WSATYPE_NOT_FOUND (10109)
Class Type Not Found -- The specified class was not found.
WSAHOST_NOT_FOUND (11001)
Host Not Found -- No network host matching the hostname or address was found.
WSATRY_AGAIN (11002)
Non-Authoritative Host Not Found -- A temporary error while resolving a hostname occured, and should be retried later.
WSANO_RECOVERY (11003)
This is a Non-Recoverable Error -- Some sort of non-recoverable error occured during a database lookup.
WSANO_DATA (11004)
Valid Name, No Data Record of Requested Type -- The requested name is valid and was found, but does not have the associated data requested.

Constant Definitions

Const WSAEINTR = 10004
Const WSAEACCESS = 10013
Const WSAEFAULT = 10014
Const WSAEINVAL = 10022
Const WSAEMFILE = 10024
Const WSAEWOULDBLOCK = 10035
Const WSAEINPROGRESS = 10036
Const WSAEALREADY = 10037
Const WSAENOTSOCK = 10038
Const WSAEDESTADDRREQ = 10039
Const WSAEMSGSIZE = 10040
Const WSAEPROTOTYPE = 10041
Const WSAENOPROTOOPT = 10042
Const WSAEPROTONOSUPPORT = 10043
Const WSAESOCKTNOSUPPORT = 10044
Const WSAEOPNOTSUPP = 10045
Const WSAEPFNOSUPPORT = 10046
Const WSAEAFNOSUPPORT = 10047
Const WSAEADDRINUSE = 10048
Const WSAEADDRNOTAVAIL = 10049
Const WSAENETDOWN = 10050
Const WSAENETUNREACH = 10051
Const WSAENETRESET = 10052
Const WSAECONNABORTED = 10053
Const WSAECONNRESET = 10054
Const WSAENOBUFS = 10055
Const WSAEISCONN = 10056
Const WSAENOTCONN = 10057
Const WSAESHUTDOWN = 10058
Const WSAETIMEDOUT = 10060
Const WSAECONNREFUSED = 10061
Const WSAEHOSTDOWN = 10064
Const WSAEHOSTUNREACH = 10065
Const WSAEPROCLIM = 10067
Const WSASYSNOTREADY = 10091
Const WSAVERNOTSUPPORTED = 10092
Const WSANOTINITIALIZED = 10093
Const WSAEDISCON = 10094
Const WSATYPE_NOT_FOUND = 10109
Const WSAHOST_NOT_FOUND = 11001
Const WSATRY_AGAIN = 11002
Const WSANO_RECOVERY = 11003
Const WSANO_DATA = 11004

Back to the Reference section.


Last Modified: October 29, 2000
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/other/winsockerror.html