![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include <plain_client.hpp>
Public Member Functions | |
plain_client_t (const options_t &options_) | |
virtual | ~plain_client_t () |
virtual int | next_handshake_command (msg_t *msg_) |
virtual int | process_handshake_command (msg_t *msg_) |
virtual status_t | status () const |
![]() | |
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_t & | get_zap_properties () |
const metadata_t::dict_t & | get_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) |
virtual int | zap_msg_available () |
Private Types | |
enum | state_t { sending_hello, waiting_for_welcome, sending_initiate, waiting_for_ready, error_command_received, ready } |
Private Member Functions | |
int | process_error (const unsigned char *cmd_data, size_t data_size) |
int | process_ready (const unsigned char *cmd_data, size_t data_size) |
int | process_welcome (const unsigned char *cmd_data, size_t data_size) |
int | produce_hello (msg_t *msg_) const |
int | produce_initiate (msg_t *msg_) const |
Private Attributes | |
state_t | state |
Additional Inherited Members | |
![]() | |
enum | status_t { handshaking, ready, error } |
![]() | |
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 |
![]() | |
options_t | options |
metadata_t::dict_t | zap_properties |
metadata_t::dict_t | zmtp_properties |
Definition at line 41 of file plain_client.hpp.
|
private |
Enumerator | |
---|---|
sending_hello | |
waiting_for_welcome | |
sending_initiate | |
waiting_for_ready | |
error_command_received | |
ready |
Definition at line 55 of file plain_client.hpp.
zmq::plain_client_t::plain_client_t | ( | const options_t & | options_ | ) |
Definition at line 43 of file plain_client.cpp.
|
virtual |
Definition at line 49 of file plain_client.cpp.
Implements zmq::mechanism_t.
Definition at line 53 of file plain_client.cpp.
References produce_hello(), produce_initiate(), sending_hello, sending_initiate, state, waiting_for_ready, and waiting_for_welcome.
|
private |
Definition at line 208 of file plain_client.cpp.
References EPROTO, error_command_received, state, waiting_for_ready, and waiting_for_welcome.
Referenced by process_handshake_command().
Implements zmq::mechanism_t.
Definition at line 75 of file plain_client.cpp.
References zmq::msg_t::close(), zmq::msg_t::data, EPROTO, errno_assert, zmq::msg_t::init(), process_error(), process_ready(), process_welcome(), and zmq::msg_t::size.
|
private |
Definition at line 195 of file plain_client.cpp.
References EPROTO, zmq::mechanism_t::parse_metadata(), ready, state, and waiting_for_ready.
Referenced by process_handshake_command().
|
private |
Definition at line 147 of file plain_client.cpp.
References EPROTO, LIBZMQ_UNUSED, sending_initiate, state, and waiting_for_welcome.
Referenced by process_handshake_command().
Definition at line 118 of file plain_client.cpp.
References zmq::msg_t::data, errno_assert, zmq::msg_t::init_size(), zmq::mechanism_t::options, zmq::options_t::plain_password, zmq::options_t::plain_username, and zmq_assert.
Referenced by next_handshake_command().
Definition at line 164 of file plain_client.cpp.
References zmq::mechanism_t::add_property(), alloc_assert, zmq::msg_t::data, errno_assert, zmq::options_t::identity, zmq::options_t::identity_size, zmq::msg_t::init_size(), zmq::mechanism_t::options, zmq::mechanism_t::socket_type_string(), zmq::options_t::type, ZMQ_DEALER, ZMQ_REQ, and ZMQ_ROUTER.
Referenced by next_handshake_command().
|
virtual |
Implements zmq::mechanism_t.
Definition at line 107 of file plain_client.cpp.
References zmq::mechanism_t::error, error_command_received, zmq::mechanism_t::handshaking, zmq::mechanism_t::ready, ready, and state.
|
private |
Definition at line 64 of file plain_client.hpp.
Referenced by next_handshake_command(), process_error(), process_ready(), process_welcome(), and status().