Merge pull request #295 from trya/master

Add message_t::get()
This commit is contained in:
Simon Giesecke
2019-03-13 11:38:49 +01:00
committed by GitHub

10
zmq.hpp
View File

@@ -385,6 +385,16 @@ class message_t
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)
inline const char *gets(const char *property_)
{