From 531c6af0d4df606ddef15da821dad20399b9480a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 9 Mar 2010 16:56:53 +0100 Subject: message flags added to zmq_msg_t strcuture --- bindings/c/zmq.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bindings') diff --git a/bindings/c/zmq.h b/bindings/c/zmq.h index 9eac38a..7d8d8ad 100644 --- a/bindings/c/zmq.h +++ b/bindings/c/zmq.h @@ -102,15 +102,19 @@ ZMQ_EXPORT const char *zmq_strerror (int errnum); #define ZMQ_DELIMITER 31 #define ZMQ_VSM 32 -// A message. If 'shared' is true, message content pointed to by 'content' -// is shared, i.e. reference counting is used to manage its lifetime -// rather than straighforward malloc/free. Not that 'content' is not a pointer -// to the raw data. Rather it is pointer to zmq::msg_content_t structure +// Message flags. ZMQ_MSG_SHARED is strictly speaking not a message flag +// (it has no equivalent in the wire format), however, making it a flag +// allows us to pack the stucture tigher and thus improve performance. +#define ZMQ_MSG_TBC 1 +#define ZMQ_MSG_SHARED 128 + +// A message. Note that 'content' is not a pointer to the raw data. +// Rather it is pointer to zmq::msg_content_t structure // (see src/msg_content.hpp for its definition). typedef struct { void *content; - unsigned char shared; + unsigned char flags; unsigned char vsm_size; unsigned char vsm_data [ZMQ_MAX_VSM_SIZE]; } zmq_msg_t; -- cgit v1.2.3