libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq::v2_decoder_t Class Reference

#include <v2_decoder.hpp>

Inheritance diagram for zmq::v2_decoder_t:
Collaboration diagram for zmq::v2_decoder_t:

Public Member Functions

 v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_)
 
virtual ~v2_decoder_t ()
 
virtual msg_tmsg ()
 
- Public Member Functions inherited from zmq::shared_message_memory_allocator
 shared_message_memory_allocator (std::size_t bufsize_)
 
 shared_message_memory_allocator (std::size_t bufsize_, std::size_t maxMessages)
 
 ~shared_message_memory_allocator ()
 
void advance_content ()
 
unsigned char * allocate ()
 
unsigned char * buffer ()
 
unsigned char * data ()
 
void deallocate ()
 
void inc_ref ()
 
zmq::msg_t::content_tprovide_content ()
 
unsigned char * release ()
 
void resize (std::size_t new_size)
 
std::size_t size () const
 
- Public Member Functions inherited from zmq::decoder_base_t< v2_decoder_t, shared_message_memory_allocator >
 decoder_base_t (shared_message_memory_allocator *allocator_)
 
virtual ~decoder_base_t ()
 
int decode (const unsigned char *data_, std::size_t size_, std::size_t &bytes_used_)
 
void get_buffer (unsigned char **data_, std::size_t *size_)
 
virtual void resize_buffer (std::size_t new_size)
 
- Public Member Functions inherited from zmq::i_decoder
virtual ~i_decoder ()
 
virtual int decode (const unsigned char *data_, size_t size_, size_t &processed)=0
 
virtual void get_buffer (unsigned char **data_, size_t *size_)=0
 
virtual void resize_buffer (size_t)=0
 

Private Member Functions

 v2_decoder_t (const v2_decoder_t &)
 
int eight_byte_size_ready (unsigned char const *)
 
int flags_ready (unsigned char const *)
 
int message_ready (unsigned char const *)
 
int one_byte_size_ready (unsigned char const *)
 
void operator= (const v2_decoder_t &)
 
int size_ready (uint64_t size_, unsigned char const *)
 

Private Attributes

msg_t in_progress
 
const int64_t maxmsgsize
 
unsigned char msg_flags
 
unsigned char tmpbuf [8]
 

Additional Inherited Members

- Static Public Member Functions inherited from zmq::shared_message_memory_allocator
static void call_dec_ref (void *, void *buffer)
 
- Protected Types inherited from zmq::decoder_base_t< v2_decoder_t, shared_message_memory_allocator >
typedef int(v2_decoder_t::* step_t) (unsigned char const *)
 
- Protected Member Functions inherited from zmq::decoder_base_t< v2_decoder_t, shared_message_memory_allocator >
void next_step (void *read_pos_, std::size_t to_read_, step_t next_)
 

Detailed Description

Definition at line 41 of file v2_decoder.hpp.

Constructor & Destructor Documentation

zmq::v2_decoder_t::v2_decoder_t ( size_t  bufsize_,
int64_t  maxmsgsize_ 
)
zmq::v2_decoder_t::~v2_decoder_t ( )
virtual

Definition at line 61 of file v2_decoder.cpp.

References zmq::msg_t::close(), errno_assert, and in_progress.

Here is the call graph for this function:

zmq::v2_decoder_t::v2_decoder_t ( const v2_decoder_t )
private

Member Function Documentation

int zmq::v2_decoder_t::eight_byte_size_ready ( unsigned char const *  read_from)
private

Definition at line 90 of file v2_decoder.cpp.

References zmq::get_uint64(), size_ready(), and tmpbuf.

Referenced by flags_ready(), and msg().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::v2_decoder_t::flags_ready ( unsigned char const *  )
private
int zmq::v2_decoder_t::message_ready ( unsigned char const *  )
private

Definition at line 162 of file v2_decoder.cpp.

References flags_ready(), zmq::decoder_base_t< v2_decoder_t, shared_message_memory_allocator >::next_step(), and tmpbuf.

Referenced by msg(), and size_ready().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual msg_t* zmq::v2_decoder_t::msg ( )
inlinevirtual

Implements zmq::i_decoder.

Definition at line 51 of file v2_decoder.hpp.

References eight_byte_size_ready(), flags_ready(), in_progress, message_ready(), one_byte_size_ready(), and size_ready().

Here is the call graph for this function:

int zmq::v2_decoder_t::one_byte_size_ready ( unsigned char const *  read_from)
private

Definition at line 85 of file v2_decoder.cpp.

References size_ready(), and tmpbuf.

Referenced by flags_ready(), and msg().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::v2_decoder_t::operator= ( const v2_decoder_t )
private

Member Data Documentation

msg_t zmq::v2_decoder_t::in_progress
private

Definition at line 64 of file v2_decoder.hpp.

Referenced by msg(), size_ready(), v2_decoder_t(), and ~v2_decoder_t().

const int64_t zmq::v2_decoder_t::maxmsgsize
private

Definition at line 66 of file v2_decoder.hpp.

Referenced by size_ready().

unsigned char zmq::v2_decoder_t::msg_flags
private

Definition at line 63 of file v2_decoder.hpp.

Referenced by flags_ready(), and size_ready().

unsigned char zmq::v2_decoder_t::tmpbuf[8]
private