nn::socket::Poll Function
s32 Poll(
PollFd fds[],
u32 nfds,
s32 timeout
);
| Name | Description | |
|---|---|---|
| in | fds[] | Specifies the socket to poll and the polling conditions as well as the PollFd array for getting the polling results. |
| in | nfds | Specifies the number of elements in the array specified in fds. |
| in | timeout | Specifies the number of milliseconds to wait for a socket to be found before timing out. Specify a value of 0 or greater, or one of the following constants.INFTIM: Do not time out. |
| Value | Description |
|---|---|
| Positive value | Number of socket descriptors that can read or write. |
| 0 | The call has timed out. |
EINVAL |
Indicates an illegal call of one of the following. The pointer to the start of the array specified by fds is invalid. The number of elements in the array specified by nfds is invalid. |
ENETRESET |
Socket library is not initialized. |
ENETDOWN |
The network is not available. |
Checks the specified set of multiple socket descriptors to see if reading or writing is possible for any of them.
This function monitors changes in the state of sockets. Normally, it blocks until a socket satisfying the specified conditions is found. The function unblocks if it times out without finding a socket that meets the specified conditions, if the Shutdown or Close function is used to interrupt socket sending and receiving, or if any abnormality is detected in a socket.
CONFIDENTIAL