mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Merge pull request #1131 from rodgert/master
Added ZMQ_SHARED message option to zmq_msg_get()
This commit is contained in:
commit
d4d65da20d
1
AUTHORS
1
AUTHORS
@ -95,6 +95,7 @@ Taras Shpot
|
||||
Tero Marttila
|
||||
Terry Wilson
|
||||
Thijs Terlouw
|
||||
Thomas Rodgers
|
||||
Toralf Wittner
|
||||
Tore Halvorsen
|
||||
Trevor Bernard
|
||||
|
@ -311,6 +311,7 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property);
|
||||
/* Message options */
|
||||
#define ZMQ_MORE 1
|
||||
#define ZMQ_SRCFD 2
|
||||
#define ZMQ_SHARED 3
|
||||
|
||||
/* Send/recv options. */
|
||||
#define ZMQ_DONTWAIT 1
|
||||
|
@ -629,6 +629,8 @@ int zmq_msg_get (zmq_msg_t *msg_, int property_)
|
||||
case ZMQ_SRCFD:
|
||||
// warning: int64_t to int
|
||||
return ((zmq::msg_t*) msg_)->fd ();
|
||||
case ZMQ_SHARED:
|
||||
return (((zmq::msg_t*) msg_)->flags () & zmq::msg_t::shared)? 1: 0;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user