Function nanomsg_sys::nn_recv[][src]

pub unsafe extern "C" fn nn_recv(
    socket: c_int,
    buf: *mut c_void,
    len: size_t,
    flags: c_int
) -> c_int

"Receive a message from the socket s and store it in the buffer referenced by the buf argument. Any bytes exceeding the length specified by the len argument will be truncated.

Alternatively, nanomsg can allocate the buffer for you. To do so, let the buf parameter be a pointer to a void* variable (pointer to pointer) to the receive buffer and set the len parameter to NN_MSG. If the call is successful the user is responsible for deallocating the message using the nn_freemsg(3) function."

http://nanomsg.org/v0.4/nn_recv.3.html