libzmq master
The Intelligent Transport Layer
Classes | Public Types | Public Member Functions | Private Types | Private Attributes

zmq::msg_t Class Reference

#include <msg.hpp>

Collaboration diagram for zmq::msg_t:

List of all members.

Classes

struct  content_t

Public Types

enum  { more = 1, identity = 64, shared = 128 }

Public Member Functions

void add_refs (int refs_)
bool check ()
int close ()
int copy (msg_t &src_)
void * data ()
unsigned char flags ()
int init ()
int init_data (void *data_, size_t size_, msg_free_fn *ffn_, void *hint_)
int init_delimiter ()
int init_size (size_t size_)
bool is_delimiter ()
bool is_vsm ()
int move (msg_t &src_)
void reset_flags (unsigned char flags_)
bool rm_refs (int refs_)
void set_flags (unsigned char flags_)
size_t size ()

Private Types

enum  { max_vsm_size = 29 }
enum  type_t {
  type_min = 101, type_vsm = 101, type_lmsg = 102, type_delimiter = 103,
  type_max = 103
}

Private Attributes

union {
   struct {
      unsigned char   flags
      unsigned char   type
      unsigned char   unused [max_vsm_size+1]
   }   base
   struct {
      unsigned char   flags
      unsigned char   type
      unsigned char   unused [max_vsm_size+1]
   }   delimiter
   struct {
      content_t *   content
      unsigned char   flags
      unsigned char   type
      unsigned char   unused [max_vsm_size+1-sizeof(content_t *)]
   }   lmsg
   struct {
      unsigned char   data [max_vsm_size]
      unsigned char   flags
      unsigned char   size
      unsigned char   type
   }   vsm
u

Detailed Description

Definition at line 45 of file msg.hpp.


Member Enumeration Documentation

anonymous enum
Enumerator:
more 
identity 
shared 

Definition at line 50 of file msg.hpp.

anonymous enum [private]
Enumerator:
max_vsm_size 

Definition at line 86 of file msg.hpp.

enum zmq::msg_t::type_t [private]
Enumerator:
type_min 
type_vsm 
type_lmsg 
type_delimiter 
type_max 

Definition at line 105 of file msg.hpp.


Member Function Documentation

void zmq::msg_t::add_refs ( int  refs_)

Definition at line 246 of file msg.cpp.

References shared, and zmq_assert.

Referenced by zmq::dist_t::distribute().

Here is the caller graph for this function:

bool zmq::msg_t::check ( )

Definition at line 39 of file msg.cpp.

References type_max, type_min, and u.

Referenced by copy(), move(), zmq::socket_base_t::recv(), and zmq::socket_base_t::send().

Here is the caller graph for this function:

int zmq::msg_t::close ( )
int zmq::msg_t::copy ( msg_t src_)

Definition at line 159 of file msg.cpp.

References base, check(), lmsg, shared, u, and unlikely.

Here is the call graph for this function:

void* zmq::msg_t::data ( )
unsigned char zmq::msg_t::flags ( )
int zmq::msg_t::init ( )
int zmq::msg_t::init_data ( void *  data_,
size_t  size_,
msg_free_fn ffn_,
void *  hint_ 
)

Definition at line 78 of file msg.cpp.

int zmq::msg_t::init_delimiter ( )

Definition at line 98 of file msg.cpp.

Referenced by zmq::pipe_t::terminate().

Here is the caller graph for this function:

int zmq::msg_t::init_size ( size_t  size_)
bool zmq::msg_t::is_delimiter ( )

Definition at line 236 of file msg.cpp.

Referenced by zmq::pipe_t::is_delimiter(), and zmq::pipe_t::read().

Here is the caller graph for this function:

bool zmq::msg_t::is_vsm ( )

Definition at line 241 of file msg.cpp.

Referenced by zmq::dist_t::distribute().

Here is the caller graph for this function:

int zmq::msg_t::move ( msg_t src_)

Definition at line 138 of file msg.cpp.

References check(), init(), and unlikely.

Referenced by zmq::xsub_t::xrecv(), and zmq::xrep_t::xrecv().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::msg_t::reset_flags ( unsigned char  flags_)

Definition at line 231 of file msg.cpp.

Referenced by zmq::socket_base_t::send().

Here is the caller graph for this function:

bool zmq::msg_t::rm_refs ( int  refs_)

Definition at line 266 of file msg.cpp.

References shared, and zmq_assert.

Referenced by zmq::dist_t::distribute().

Here is the caller graph for this function:

void zmq::msg_t::set_flags ( unsigned char  flags_)

Definition at line 226 of file msg.cpp.

Referenced by zmq::socket_base_t::send(), zmq::session_base_t::write(), zmq::xrep_t::xrecv(), and zmq::req_t::xsend().

Here is the caller graph for this function:

size_t zmq::msg_t::size ( )

Member Data Documentation

struct { ... } zmq::msg_t::base

Referenced by copy().

Definition at line 131 of file msg.hpp.

struct { ... } zmq::msg_t::delimiter
unsigned char zmq::msg_t::flags
struct { ... } zmq::msg_t::lmsg

Referenced by copy().

unsigned char zmq::msg_t::type

Definition at line 121 of file msg.hpp.

union { ... } zmq::msg_t::u [private]

Referenced by check(), and copy().

unsigned char zmq::msg_t::unused[max_vsm_size+1]

Definition at line 120 of file msg.hpp.

struct { ... } zmq::msg_t::vsm

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines