mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
Added message type for constant messages
This commit is contained in:
13
src/msg.hpp
13
src/msg.hpp
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user