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

◆ NRF_MSG_PEEK

#define NRF_MSG_PEEK   0x02

#include <nrf_modem/include/nrf_socket.h>

Return data from the beginning of receive queue without removing data from the input queue.

This flag is only supported for the nrf_recv and nrf_recvfrom functions. When this flag is used, the data is copied into the provided buffer but remains in the socket's input queue for future reads. Subsequent calls to nrf_recv or nrf_recvfrom returns the same data until it is read without the NRF_MSG_PEEK flag. This flag is useful when an application needs to inspect incoming data without consuming it, allowing for multiple reads of the same data. The default behavior is to remove the data from the input queue after it has been read.