Open trevorbernard opened 11 years ago
The zmq_send and zmq_recv functions were added during the 3.x development to provide a simpler API and they do not do zero copy, ever. You need to use the older lower-level zmq_msg_send and zmq_msg_recv functions, and on sending, the zmq_msg_init_data function to pass the application buffer.
https://github.com/zeromq/jzmq/blob/v2.1.2/src/Socket.cpp#L484 https://github.com/zeromq/libzmq/blob/master/src/zmq.cpp#L364
https://github.com/zeromq/jzmq/blob/v2.1.2/src/Socket.cpp#L587 https://github.com/zeromq/libzmq/blob/master/src/zmq.cpp#L460
See http://api.zeromq.org/3-2:zmq-msg-init-data for true zero copy