nanomsg.rs
nanomsg.rs copied to clipboard
Expose a read/receive method without NN_MSG option
Is there a way to provide nn_recv the native buffer used by a Vec[u8], to avoid the copy ?
Yeah, that would be ideal. Nanomsg also supports true zero-copy.
In fact, this should be the default behavior of the Reader trait read
function. Since it is passed a mutable slice, there must be a way to tell nanomsg to use the native underlying pointer and to remove the NN_MSG option. I think now that the read_to_end
function is the only right place to use NN_MSG.
Agreed!
This is now done as read function of Reader trait is passing the raw pointer of the slice parameter to nanomsg.