The socket method creates a new UDT socket.
If no error occurs, socket returns the new UDT socket descriptor; otherwise, it returns UDT::INVALID_SOCK and the error information can be retrieved by getlasterror.
Error Name | Error Code | Comment |
EINVPARAM | 5003 | Invalid parameters. |
The socket methods creates a new socket. The is no limits for the number of UDT sockets in one system, as long as there is enough system resource. UDT supports both IPv4 and IPv6, which can be selected by the af parameter. On the other hand, two socket types are supports in UDT, i.e., SOCK_STREAM for data streaming and SOCK_DGRAM for messaging. Note that UDT sockets are connection oriented in all cases.