Function SocketNew() Professional
Creates a new, unbound socket.
SocketNew( [<nAddressFamily>], ; [<nSocketType>] , ; [<nProtocol>] , ; [@<nError>] ) --> nSocket
|SOCK_STREAM *)||TCP stream socket|
|SOCK_DGRAM||UDP datagram socket|
The function returns a new socket descriptor on success, or the value of INVALID_SOCKET on error.
The function allocates resources for a new, unbound socket of a given type and prepares it for the specified protocol. If a protocol is not defined, the default for the specified socket type is used. When the socket is created for connection-oriented communication (i.e. SOCK_STREAM), it must be in connected state before any data can be transferred on it with SocketSend() or SocketRecv(). A connection to another socket is created with SocketConnect(). The connection must be interrupted with SocketClose() when the communication is complete.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.