nn::socket::Fcntl Function
s32 Fcntl(
s32 s,
s32 cmd,
s32 val
);
| Name | Description | |
|---|---|---|
| in | s | Specifies the socket descriptor. Specify a socket descriptor created using the Socket or Accept function. |
| in | cmd | Specifies what to do with the status flags.F_GETFL: Read the status flags.F_SETFL: Change the status flags. |
| in | val | Specifies additional arguments required for certain actions. If cmd is F_GETFL, there are no additional arguments required and this argument is ignored. If cmd is F_SETFL, this specifies the status flags to set. Specify 0 or a bitwise OR of the following values.O_NONBLOCK: Sets the socket to non-blocking mode. If this flag is not specified, the socket will be in blocking mode. Note that a socket is set in blocking mode by default at time of creation. |
| Value | Description |
|---|---|
| 0 | Process was successful. |
ENETRESET |
Socket library is not initialized. |
EBADF |
Invalid socket descriptor. |
Sets or gets socket status flags.
CONFIDENTIAL