mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-12-23 22:08:36 +01:00
Merge pull request #43 from tolchz/master
Add an rvalue overload for socket_t::send
This commit is contained in:
7
zmq.hpp
7
zmq.hpp
@@ -441,6 +441,13 @@ namespace zmq
|
|||||||
throw error_t ();
|
throw error_t ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ZMQ_HAS_RVALUE_REFS
|
||||||
|
inline bool send (message_t &&msg_, int flags_ = 0)
|
||||||
|
{
|
||||||
|
return send(msg_, flags_);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline size_t recv (void *buf_, size_t len_, int flags_ = 0)
|
inline size_t recv (void *buf_, size_t len_, int flags_ = 0)
|
||||||
{
|
{
|
||||||
int nbytes = zmq_recv (ptr, buf_, len_, flags_);
|
int nbytes = zmq_recv (ptr, buf_, len_, flags_);
|
||||||
|
|||||||
Reference in New Issue
Block a user