Home |
Function net_socket |
Function net_socketAllocates a UDP or TCP socket in non-blocking mode. SOCKET net_socket(int type); ParameterstypeProtocol type: SOCK_STREAM for TCP or SOCK_DGRAM for UDP. return valueReturns INVALID_SOCKET if no more sockets are available or a socket number >= 0. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Error Codes further describes each error. This function calls function socket internally and places the returned socket in non-blocking mode by calling net_set_non_blocking. Applications can return to blocking mode at any time by calling net_set_blocking.
|