Error Message:

WINSOCK Error: Can't assign requested address.

Explanation:

This error normally results from an attempt to create a socket with an address found on another computer. The "address" it refers to is the remote socket name (protocol, port, and address). This error occurs when the sin_port value is zero in a sockaddr_in structure for connect() or sendto().

User Action:

Developer suggestions: Let the network system assign the default local IP address by referencing INADDR_ANY in the sin_addr field of a sockaddr_in structure input to bind(). Alternatively, you can get the local IP address by calling gethostname() followed by gethostbyname().