mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-12-23 05:47:17 +01:00
Merge pull request #104 from laplaceyang/pr_remove_zmq_send_const
misuse of zmq_send_const
This commit is contained in:
4
zmq.hpp
4
zmq.hpp
@@ -624,11 +624,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)
|
||||||
{
|
{
|
||||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 0, 8)
|
|
||||||
int nbytes = zmq_send_const (ptr, buf_, len_, flags_);
|
|
||||||
#else
|
|
||||||
int nbytes = zmq_send (ptr, buf_, len_, flags_);
|
int nbytes = zmq_send (ptr, buf_, len_, flags_);
|
||||||
#endif
|
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return (size_t) nbytes;
|
return (size_t) nbytes;
|
||||||
if (zmq_errno () == EAGAIN)
|
if (zmq_errno () == EAGAIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user