nn::socket::Socket Function
s32 Socket(
s32 af,
s32 type,
s32 protocol
);
| Name | Description | |
|---|---|---|
| in | af | Specify PF_INET. |
| in | type | Specifies the type of socket to create. Currently, SOCK_STREAM and SOCK_DGRAM are supported. |
| in | protocol | Specifies the protocol to use with the socket. If protocol is 0, the default protocol for the specified protocol family and type is used. Currently, 0 is the only value you can specify. |
| Value | Description |
|---|---|
| 1 or higher | The new socket descriptor. |
ENETRESET |
Socket library is not initialized. |
EAFNOSUPPORT |
Address family not supported. |
EPROTONOSUPPORT |
Protocol not supported. |
EMFILE |
Cannot create any more socket descriptors. |
ENOMEM |
Insufficient memory. |
EPROTOTYPE |
Socket type not supported. |
Creates new socket descriptors.
The current version allows you to create at least eight sockets at the same time.
CONFIDENTIAL