#include <nitroWiFi/soc.h>
int SOC_Bind ( int s, const void* sockAddr );
s |
Socket descriptor to be bound. |
sockAddr |
The pointer to the socket address structures (SOCSockAddr and SOCSockAddrIn ) that store the addresses to be bound to the socket. |
0 or higher | Successful. |
SOC_EALREADY |
Starting the connection process. |
SOC_EINVAL |
Invalid processing. (Socket is already bound to address, etc.) |
SOC_EMFILE |
Cannot create any more socket descriptors. |
SOC_ENETRESET |
Socket library is not initialized. |
SOC_ENOBUFS |
Insufficient resources. |
SOC_ETIMEDOUT |
TCP connection timeout. |
Note: Additional errors may be generated and returned in future library releases. Treat all negative return values as general errors.
This function performs the socket's local port settings (binds it).
With CPS functions, the destination port and address are set at the same time when connecting, and this function merely saves the local port setting value inside the socket structure.
12/12/2005 Changed Return Values.
9/13/2005 Initial version.