Function nrfxlib_sys::nrf_poll [−][src]
pub unsafe extern "C" fn nrf_poll(
p_fds: *mut nrf_pollfd,
nfds: u32,
timeout: c_int
) -> c_int
Method to poll for events on one or more sockets.
-
p_fds
- An array of sockets, and respective for each socket that the caller polls for. The occurred events per socket is returned in the revents field of nrf_pollfd structure. Shall not be NULL. -
nfds
- Positive number of sockets being polled for events. Shall not be more than BSD_MAX_SOCKET_COUNT. -
timeout
- Timeout in milliseconds. The methods waits for this time period for the events to occur on the sockets.
Returns A positive number less than or equal to nfds indicating sockets on which events occurred. 0 indicates the timed out occurred and no file descriptors were ready. -1 on error, and errno indicates the reason for failure.