Definitions
SOCKET - same as unsigned int CHAR = built-in data type, holds 1 byte struct WSAData { unsigned short wVersion; unsigned short wHighVersion; char szDescription[WSADESCRIPTION_LEN+1]; WSADESCRIPTION_LEN = 256 char szSystemStatus[WSASYS_STATUS_LEN+1]; WSASYS_STATUS_LEN = 128 unsigned short iMaxSockets; unsigned short iMaxUdpDg; char FAR * lpVendorInfo; }; struct hostent { char * FAR h_name; char FAR * FAR * h_aliases; short h_addrtype; short h_length; char FAR * FAR * h_addr_list; }; struct sockaddr_in { short sin_family; unsigned short sin_port; struct in_addr sin_addr; char sin_zero[8]; }; struct in_addr { union { struct { unsigned char s_b1,s_b2,s_b3,s_b4; } S_un_b; struct { unsigned short s_w1,s_w2; } S_un_w; unsigned long S_addr; } S_un; };Common Error Codes
Error Code | Description |
WSAEADDRNOTAVAIL (10049) | The address you are trying to bind to is not available. |
WSAECONNREFUSED (10061) | Connection refused by remote host |
WSAENOTCONN (10057) | Socket is not currently connected |
WSAHOST_NOT_FOUND (11001) | The host name you are trying to resolve was not found |
WSAECONNABORTED (10053) | Connection was terminated due to time-out or other error. |