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

#include <null_mechanism.hpp>

Inheritance diagram for zmq::null_mechanism_t:
Collaboration diagram for zmq::null_mechanism_t:

Public Member Functions

 null_mechanism_t (session_base_t *session_, const std::string &peer_address, const options_t &options_)
 
virtual ~null_mechanism_t ()
 
virtual int next_handshake_command (msg_t *msg_)
 
virtual int process_handshake_command (msg_t *msg_)
 
virtual status_t status () const
 
virtual int zap_msg_available ()
 
- Public Member Functions inherited from zmq::mechanism_t
 mechanism_t (const options_t &options_)
 
virtual ~mechanism_t ()
 
virtual int decode (msg_t *)
 
virtual int encode (msg_t *)
 
blob_t get_user_id () const
 
const metadata_t::dict_tget_zap_properties ()
 
const metadata_t::dict_tget_zmtp_properties ()
 
void peer_identity (msg_t *msg_)
 
void set_peer_identity (const void *id_ptr, size_t id_size)
 
void set_user_id (const void *user_id, size_t size)
 

Private Member Functions

int process_error_command (const unsigned char *cmd_data, size_t data_size)
 
int process_ready_command (const unsigned char *cmd_data, size_t data_size)
 
int receive_and_process_zap_reply ()
 
void send_zap_request ()
 

Private Attributes

bool error_command_received
 
bool error_command_sent
 
const std::string peer_address
 
bool ready_command_received
 
bool ready_command_sent
 
session_base_t *const session
 
char status_code [3]
 
bool zap_connected
 
bool zap_reply_received
 
bool zap_request_sent
 

Additional Inherited Members

- Public Types inherited from zmq::mechanism_t
enum  status_t { handshaking, ready, error }
 
- Protected Member Functions inherited from zmq::mechanism_t
size_t add_property (unsigned char *ptr, const char *name, const void *value, size_t value_len) const
 
int parse_metadata (const unsigned char *ptr_, size_t length, bool zap_flag=false)
 
virtual int property (const std::string &name_, const void *value_, size_t length_)
 
const char * socket_type_string (int socket_type) const
 
- Protected Attributes inherited from zmq::mechanism_t
options_t options
 
metadata_t::dict_t zap_properties
 
metadata_t::dict_t zmtp_properties
 

Detailed Description

Definition at line 42 of file null_mechanism.hpp.

Constructor & Destructor Documentation

zmq::null_mechanism_t::null_mechanism_t ( session_base_t session_,
const std::string &  peer_address,
const options_t options_ 
)

Definition at line 46 of file null_mechanism.cpp.

References zmq::mechanism_t::options, session, zmq::session_base_t::zap_connect(), zap_connected, and zmq::options_t::zap_domain.

Here is the call graph for this function:

zmq::null_mechanism_t::~null_mechanism_t ( )
virtual

Definition at line 67 of file null_mechanism.cpp.

Member Function Documentation

int zmq::null_mechanism_t::process_error_command ( const unsigned char *  cmd_data,
size_t  data_size 
)
private

Definition at line 175 of file null_mechanism.cpp.

References EPROTO, and error_command_received.

Referenced by process_handshake_command().

Here is the caller graph for this function:

int zmq::null_mechanism_t::process_handshake_command ( msg_t msg_)
virtual
int zmq::null_mechanism_t::process_ready_command ( const unsigned char *  cmd_data,
size_t  data_size 
)
private

Definition at line 168 of file null_mechanism.cpp.

References zmq::mechanism_t::parse_metadata(), and ready_command_received.

Referenced by process_handshake_command().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::null_mechanism_t::receive_and_process_zap_reply ( )
private
void zmq::null_mechanism_t::send_zap_request ( )
private
int zmq::null_mechanism_t::zap_msg_available ( )
virtual

Reimplemented from zmq::mechanism_t.

Definition at line 191 of file null_mechanism.cpp.

References EFSM, receive_and_process_zap_reply(), and zap_reply_received.

Here is the call graph for this function:

Member Data Documentation

bool zmq::null_mechanism_t::error_command_received
private

Definition at line 68 of file null_mechanism.hpp.

Referenced by process_error_command(), process_handshake_command(), and status().

bool zmq::null_mechanism_t::error_command_sent
private

Definition at line 66 of file null_mechanism.hpp.

Referenced by next_handshake_command(), and status().

const std::string zmq::null_mechanism_t::peer_address
private

Definition at line 63 of file null_mechanism.hpp.

Referenced by send_zap_request().

bool zmq::null_mechanism_t::ready_command_received
private

Definition at line 67 of file null_mechanism.hpp.

Referenced by process_handshake_command(), process_ready_command(), and status().

bool zmq::null_mechanism_t::ready_command_sent
private

Definition at line 65 of file null_mechanism.hpp.

Referenced by next_handshake_command(), and status().

session_base_t* const zmq::null_mechanism_t::session
private
char zmq::null_mechanism_t::status_code[3]
private

Definition at line 61 of file null_mechanism.hpp.

Referenced by next_handshake_command(), and receive_and_process_zap_reply().

bool zmq::null_mechanism_t::zap_connected
private

Definition at line 69 of file null_mechanism.hpp.

Referenced by next_handshake_command(), and null_mechanism_t().

bool zmq::null_mechanism_t::zap_reply_received
private

Definition at line 71 of file null_mechanism.hpp.

Referenced by next_handshake_command(), and zap_msg_available().

bool zmq::null_mechanism_t::zap_request_sent
private

Definition at line 70 of file null_mechanism.hpp.

Referenced by next_handshake_command().