Added message type for constant messages

This commit is contained in:
Uli Köhler
2013-08-18 23:40:38 +02:00
parent b3ca7fd425
commit 121a838a0c
2 changed files with 43 additions and 14 deletions

View File

@@ -69,6 +69,7 @@ namespace zmq
bool is_identity () const;
bool is_delimiter ();
bool is_vsm ();
bool is_cmsg ();
// After calling this function you can copy the message in POD-style
// refs_ times. No need to call copy.
@@ -107,7 +108,9 @@ namespace zmq
type_vsm = 101,
type_lmsg = 102,
type_delimiter = 103,
type_max = 103
// CMSG messages point to constant data
type_cmsg = 104,
type_max = 104
};
// Note that fields shared between different message types are not
@@ -132,6 +135,14 @@ namespace zmq
unsigned char type;
unsigned char flags;
} lmsg;
struct {
void* data;
size_t size;
unsigned char unused
[max_vsm_size + 1 - sizeof (void*) - sizeof (size_t)];
unsigned char type;
unsigned char flags;
} cmsg;
struct {
unsigned char unused [max_vsm_size + 1];
unsigned char type;