nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ NRF_SO_POLLCB

#define NRF_SO_POLLCB   60

#include <nrf_modem/include/nrf_socket.h>

Set a callback for nrf_poll events on sockets (write-only).

Set a callback for events occurring on this socket such as NRF_POLLIN and NRF_POLLOUT. The nrf_modem_pollcb::callback function is invoked every time any of the events specified by the nrf_modem_pollcb::events bitmask field occurs.

In addition, the NRF_POLLHUP and NRF_POLLERR events will also trigger the callback, regardless of whether they are set in the nrf_modem_pollcb::events bitmask field. The callback receives a nrf_pollfd structure, populated in the same way as it would be populated by the nrf_poll function.

If the nrf_modem_pollcb::oneshot field is set to true, the callback will be invoked only once, and it is automatically unset afterwards.

Note
The callback is executed in an interrupt context. Take care to offload any processing as appropriate.