Function nrfxlib_sys::nrf_recv [−][src]
pub unsafe extern "C" fn nrf_recv(
sock: c_int,
p_buff: *mut c_void,
nbytes: size_t,
flags: c_int
) -> ssize_t
Function for receiving data on a socket.
s API for receiving data from a socket. By default, this function will block, unless the NRF_O_NONBLOCK socket option has been set, or NRF_MSG_DONTWAIT is passed as a flag.
sock
- The socket to receive data from.p_buff
- Buffer to hold the data to be read.nbytes
- Number of bytes to read. Should not be larger than the size of p_buff.flags
- Flags to control receive behavior.
Returns The number of bytes that were read, or -1 on error.