Skip to main content

queue_read_msg

Function queue_read_msg 

Source
pub unsafe extern "C" fn queue_read_msg(
    s: *mut queue_state_t,
    buf: *mut u8,
    len: c_int,
) -> c_int
Expand description

Read a message from a queue. If the message is longer than the buffer provided, only the first len bytes of the message will be returned. The remainder of the message will be discarded. \brief Read a message from a queue. \param s The queue context. \param buf The buffer into which the message will be read. \param len The length of the buffer. \return The number of bytes returned. If there are no messages in the queue, -1 is returned.