mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-04-19 23:50:41 +02:00
Merge pull request #99 from laplaceyang/reduce_copy
reduce copy when send mem block
This commit is contained in:
commit
e2c1108672
2
zmq.hpp
2
zmq.hpp
@ -622,7 +622,7 @@ namespace zmq
|
|||||||
|
|
||||||
inline size_t send (const void *buf_, size_t len_, int flags_ = 0)
|
inline size_t send (const void *buf_, size_t len_, int flags_ = 0)
|
||||||
{
|
{
|
||||||
int nbytes = zmq_send (ptr, buf_, len_, flags_);
|
int nbytes = zmq_send_const (ptr, buf_, len_, flags_);
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return (size_t) nbytes;
|
return (size_t) nbytes;
|
||||||
if (zmq_errno () == EAGAIN)
|
if (zmq_errno () == EAGAIN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user