Has a slightly different meaning to
WSAEAFNOSUPPORT but is interchangeable in most cases, and all Windows Sockets functions that return one of these specify
This error will be returned if an incorrect protocol is explicitly requested in the socket call, or if an address of the wrong family is used for a socket, e.g. in sendto.
Address already in use
occurs if an application attempts to bind a socket to an IP address/port
that has already been used for an existing socket, or a socket that
wasn't closed properly, or one that is still in the process of closing.
For server applications that need to bind multiple sockets to the same port number, consider using setsockopt (SO_REUSEADDR). Client applications usually need not call bind at all - connect will choose an unused port automatically.
Network is down
Network is unreachable
No buffer space available.
Socket is already connected
Some implementations also return this error if sendto is called on a connected SOCK_DGRAM socket (For SOCK_STREAM sockets, the
"to" parameter in sendto is ignored), although other implementations treat this as a legal occurrence.
Socket is not connected
Any other type of operation might also return this error - for example, setsockoptsetting SO_KEEPALIVE if the connection has been reset.
By calling shutdown a partial close of a socket is requested, which is a signal that sending or receiving or both has been discontinued.
Connection timed out
Host is down
A socket operation encountered a dead host. Networking activity on the local host has not been initiated. These conditions are more likely to be indicated by the error WSAETIMEDOUT
No route to host
Too many processes
Users should check:
Check that no old WINSOCK.DLL files are being accessed, or contact the stack vendor to see if an updated WINSOCK.DLL exists.
The application may be accessing a socket which the current active task does not own (i.e. trying to share a socket between tasks), or WSACleanup has been called too many times.
Host not found
This error may also be returned for protocol and service queries, and means the specified name could not be found in the relevant database.
This may be because the database files (e.g. BSD-compatible HOSTS, SERVICES or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error.
The usual example for this is a hostname -> address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server), and an MX record is returned but no A record - indicating the host itself exists, but is not directly reachable.
WSA_INVALID_HANDLE (OS dependent)
WSA_INVALID_PARAMETER (OS dependent)
(OS dependent) Invalid service provider version number
A service provider returned a version number other than 2.0.
A completion indication will be given at a later time when the operation has been completed.
WSA_IO_INCOMPLETE (OS dependent)
Applications that use WSAWaitForMultipleEvents in a polling mode to determine when an overlapped operation has completed will get this error code until the operation is complete.
WSA_NOT_ENOUGH_MEMORY (OS dependent)
For example, if a call to WaitForMultipleObjects fails or one of the registry functions fails trying to manipulate the protocol/namespace catalogs.
WSA_OPERATION_ABORTED (OS dependent)
Overlapped operation aborted
An overlapped operation was canceled due to the closure of the socket, or the execution of the SIO_FLUSH command in WSAIoctl.
End of page
Page 1/3 Winsock Error Codes
Page 2/3 User Fixable Errors - There are two basic types of errors: those an application user can remedy, and those he cannot and a user should never see an error that is not user-fixable and list of user-fixable errors.
what you want?
©Copyright June 2002 Permission to re-print, please click here
Suggestions or feed-back, please drop us a note | eMail CRM Freeware | This site>>eMail Bolts & Nuts
Minute Wisdom | Sun Tzu Art of War | Useful Sites | eMail Broadcast FAQ's | Art of eMail CRM | eMail Marketing Tips