Home |
Function net_bind |
Function net_bindBinds a socket to a local port number and IP address. int net_bind(SOCKET socket, BYTE * ip_addr, WORD port); ParameterssocketSocket returned by net_socket or socket. ip_addrPointer to the local IP address in network byte order to assign to the socket. If this parameter is NULL, the socket is bound to all local addresses. portPort number in little endian byte order. If this parameter is 0, RTIP-32 will assign a free port number. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Section Error Codes further describes each error. This function calls function bind internally.
|