mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-05 00:35:32 +02:00
Add message_t::get()
Uses zmq_msg_get() to get some integer properties on the message.
This commit is contained in:
parent
bfdc7885b8
commit
16fa983281
10
zmq.hpp
10
zmq.hpp
@ -385,6 +385,16 @@ class message_t
|
|||||||
return !(*this == other);
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(3, 2, 0)
|
||||||
|
inline int get(int property_)
|
||||||
|
{
|
||||||
|
int value = zmq_msg_get(&msg, property_);
|
||||||
|
if (value == -1)
|
||||||
|
throw error_t();
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 1, 0)
|
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 1, 0)
|
||||||
inline const char *gets(const char *property_)
|
inline const char *gets(const char *property_)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user