Restored from previous forum. Originally posted by MrVainSCL.
Hi @ all
Some time ago i made this small infofile with all constants of WSAsocket i found and its error-messages... Please note, some constants are inculded/declared by PureBasic, so please dont add/set own constants of existings... Maybe this will help some of you while developing any network stuff...!?
Code: Select all
;-----------------------------------
;
; WSKSocket API - Constants
; by MrVainSCL! aka Thorsten Will
;
; (04-Aug-2002 - 00:25) v0.001
;
;-----------------------------------
;
;-------- Windows Sockets definitions of regular Microsoft C error constants
;
#WSAEINTR = 10004
#WSAEBADF = 10009
#WSAEACCES = 10013
#WSAEFAULT = 10014
#WSAEINVAL = 10022
#WSAEMFILE = 10024
;
;-------- Windows Sockets definitions of regular Berkeley error constants
;
#WSAEWOULDBLOCK = 10035
#WSAEINPROGRESS = 10036
#WSAEALREADY = 10037
#WSAENOTSOCK = 10038
#WSAEDESTADDRREQ = 10039
#WSAEMSGSIZE = 10040
#WSAEPROTOTYPE = 10041
#WSAENOPROTOOPT = 10042
#WSAEPROTONOSUPPORT = 10043
#WSAESOCKTNOSUPPORT = 10044
#WSAEOPNOTSUPP = 10045
#WSAEPFNOSUPPORT = 10046
#WSAEAFNOSUPPORT = 10047
#WSAEADDRINUSE = 10048
#WSAEADDRNOTAVAIL = 10049
#WSAENETDOWN = 10050
#WSAENETUNREACH = 10051
#WSAENETRESET = 10052
#WSAECONNABORTED = 10053
#WSAECONNRESET = 10054
#WSAENOBUFS = 10055
#WSAEISCONN = 10056
#WSAENOTCONN = 10057
#WSAESHUTDOWN = 10058
#WSAETOOMANYREFS = 10059
#WSAETIMEDOUT = 10060
#WSAECONNREFUSED = 10061
#WSAELOOP = 10062
#WSAENAMETOOLONG = 10063
#WSAEHOSTDOWN = 10064
#WSAEHOSTUNREACH = 10065
#WSAENOTEMPTY = 10066
#WSAEPROCLIM = 10067
#WSAEUSERS = 10068
#WSAEDQUOT = 10069
#WSAESTALE = 10070
#WSAEREMOTE = 10071
;
;-------- Extended Windows Sockets error constant definitions
;
#WSASYSNOTREADY = 10091
#WSAVERNOTSUPPORTED = 10092
#WSANOTINITIALISED = 10093
#WSAHOST_NOT_FOUND = 11001
#WSATRY_AGAIN = 11002
#WSANO_RECOVERY = 11003
#WSANO_DATA = 11004
#WSANO_ADDRESS = 11004
;
;-------- Select your error text-message
;
GetWSAErrorSting.s = "" ; Just remove, only for testing
errnum = 10068 ; Just remove, only for testing
;
;-----------------------------------
;
Select errnum
Case 10004 : GetWSAErrorString.s = "Interrupted system call."
Case 10009 : GetWSAErrorString.s = "Bad file number."
Case 10013 : GetWSAErrorString.s = "Permission Denied."
Case 10014 : GetWSAErrorString.s = "Bad Address."
Case 10022 : GetWSAErrorString.s = "Invalid Argument."
Case 10024 : GetWSAErrorString.s = "Too many open files."
Case 10035 : GetWSAErrorString.s = "Operation would block."
Case 10036 : GetWSAErrorString.s = "Operation now in progress."
Case 10037 : GetWSAErrorString.s = "Operation already in progress."
Case 10038 : GetWSAErrorString.s = "Socket operation on nonsocket."
Case 10039 : GetWSAErrorString.s = "Destination address required."
Case 10040 : GetWSAErrorString.s = "Message too long."
Case 10041 : GetWSAErrorString.s = "Protocol wrong type for socket."
Case 10042 : GetWSAErrorString.s = "Protocol not available."
Case 10043 : GetWSAErrorString.s = "Protocol not supported."
Case 10044 : GetWSAErrorString.s = "Socket type not supported."
Case 10045 : GetWSAErrorString.s = "Operation not supported on socket."
Case 10046 : GetWSAErrorString.s = "Protocol family not supported."
Case 10047 : GetWSAErrorString.s = "Address family not supported by protocol family."
Case 10048 : GetWSAErrorString.s = "Address already in use."
Case 10049 : GetWSAErrorString.s = "Can't assign requested address."
Case 10050 : GetWSAErrorString.s = "Network is down."
Case 10051 : GetWSAErrorString.s = "Network is unreachable."
Case 10052 : GetWSAErrorString.s = "Network dropped connection."
Case 10053 : GetWSAErrorString.s = "Software caused connection abort."
Case 10054 : GetWSAErrorString.s = "Connection reset by peer."
Case 10055 : GetWSAErrorString.s = "No buffer space available."
Case 10056 : GetWSAErrorString.s = "Socket is already connected."
Case 10057 : GetWSAErrorString.s = "Socket is not connected."
Case 10058 : GetWSAErrorString.s = "Can't send after socket shutdown."
Case 10059 : GetWSAErrorString.s = "Too many references: can't splice."
Case 10060 : GetWSAErrorString.s = "Connection timed out."
Case 10061 : GetWSAErrorString.s = "Connection refused."
Case 10062 : GetWSAErrorString.s = "Too many levels of symbolic links."
Case 10063 : GetWSAErrorString.s = "File name too long."
Case 10064 : GetWSAErrorString.s = "Host is down."
Case 10065 : GetWSAErrorString.s = "No route to host."
Case 10066 : GetWSAErrorString.s = "Directory not empty."
Case 10067 : GetWSAErrorString.s = "Too many processes."
Case 10068 : GetWSAErrorString.s = "Too many users."
Case 10069 : GetWSAErrorString.s = "Disk quota exceeded."
Case 10070 : GetWSAErrorString.s = "Stale NFS file handle."
Case 10071 : GetWSAErrorString.s = "Too many levels of remote in path."
Case 10091 : GetWSAErrorString.s = "Network subsystem is unusable."
Case 10092 : GetWSAErrorString.s = "Winsock DLL cannot support this application."
Case 10093 : GetWSAErrorString.s = "Winsock not initialized."
Case 10101 : GetWSAErrorString.s = "Disconnect."
Case 11001 : GetWSAErrorString.s = "Host not found."
Case 11002 : GetWSAErrorString.s = "Nonauthoritative host not found."
Case 11003 : GetWSAErrorString.s = "Nonrecoverable error."
Case 11004 : GetWSAErrorString.s = "Valid name, no data record of requested type."
EndSelect
;
MessageRequester ("WinSocket Error:",GetWSAErrorString.s,0) ; Just remove, only For testing
End
;
;-----------------------------------
greetz
MrVainSCL! aka Thorsten