mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-02 15:41:40 +02:00
Don't use deprecated functions
This commit is contained in:
parent
90d870b836
commit
36722d9031
6
zmq.hpp
6
zmq.hpp
@ -27,9 +27,9 @@
|
|||||||
|
|
||||||
#include <zmq.h>
|
#include <zmq.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <algorithm>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
// Detect whether the compiler supports C++11 rvalue references.
|
// Detect whether the compiler supports C++11 rvalue references.
|
||||||
@ -360,7 +360,7 @@ namespace zmq
|
|||||||
|
|
||||||
inline bool send (message_t &msg_, int flags_ = 0)
|
inline bool send (message_t &msg_, int flags_ = 0)
|
||||||
{
|
{
|
||||||
int nbytes = zmq_sendmsg (ptr, &(msg_.msg), flags_);
|
int nbytes = zmq_msg_send (&(msg_.msg), ptr, flags_);
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return true;
|
return true;
|
||||||
if (zmq_errno () == EAGAIN)
|
if (zmq_errno () == EAGAIN)
|
||||||
@ -380,7 +380,7 @@ namespace zmq
|
|||||||
|
|
||||||
inline bool recv (message_t *msg_, int flags_ = 0)
|
inline bool recv (message_t *msg_, int flags_ = 0)
|
||||||
{
|
{
|
||||||
int nbytes = zmq_recvmsg (ptr, &(msg_->msg), flags_);
|
int nbytes = zmq_msg_recv (&(msg_->msg), ptr, flags_);
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return true;
|
return true;
|
||||||
if (zmq_errno () == EAGAIN)
|
if (zmq_errno () == EAGAIN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user