![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include <plain_server.hpp>


Public Member Functions | |
| plain_server_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_) | |
| virtual | ~plain_server_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_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) |
Private Types | |
| enum | state_t { waiting_for_hello, sending_welcome, waiting_for_initiate, sending_ready, waiting_for_zap_reply, sending_error, error_command_sent, ready } |
Private Member Functions | |
| int | process_hello (msg_t *msg_) |
| int | process_initiate (msg_t *msg_) |
| int | produce_error (msg_t *msg_) const |
| int | produce_ready (msg_t *msg_) const |
| int | produce_welcome (msg_t *msg_) const |
| int | receive_and_process_zap_reply () |
| void | send_zap_request (const std::string &username, const std::string &password) |
Private Attributes | |
| const std::string | peer_address |
| session_base_t *const | session |
| state_t | state |
| std::string | status_code |
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 |
Definition at line 42 of file plain_server.hpp.
|
private |
| Enumerator | |
|---|---|
| waiting_for_hello | |
| sending_welcome | |
| waiting_for_initiate | |
| sending_ready | |
| waiting_for_zap_reply | |
| sending_error | |
| error_command_sent | |
| ready | |
Definition at line 59 of file plain_server.hpp.
| zmq::plain_server_t::plain_server_t | ( | session_base_t * | session_, |
| const std::string & | peer_address_, | ||
| const options_t & | options_ | ||
| ) |
Definition at line 44 of file plain_server.cpp.
|
virtual |
Definition at line 54 of file plain_server.cpp.
Implements zmq::mechanism_t.
Definition at line 58 of file plain_server.cpp.
References error_command_sent, produce_error(), produce_ready(), produce_welcome(), ready, sending_error, sending_ready, sending_welcome, state, and waiting_for_initiate.

Implements zmq::mechanism_t.
Definition at line 85 of file plain_server.cpp.
References zmq::msg_t::close(), EPROTO, errno_assert, zmq::msg_t::init(), process_hello(), process_initiate(), state, waiting_for_hello, and waiting_for_initiate.

Definition at line 137 of file plain_server.cpp.
References zmq::msg_t::data, EPROTO, receive_and_process_zap_reply(), send_zap_request(), sending_error, sending_welcome, session, zmq::msg_t::size, state, status_code, waiting_for_zap_reply, and zmq::session_base_t::zap_connect().
Referenced by process_handshake_command().


Definition at line 224 of file plain_server.cpp.
References zmq::msg_t::data, EPROTO, zmq::mechanism_t::parse_metadata(), sending_ready, zmq::msg_t::size, and state.
Referenced by process_handshake_command().


Definition at line 272 of file plain_server.cpp.
References zmq::msg_t::data, zmq::msg_t::init_size(), status_code, and zmq_assert.
Referenced by next_handshake_command().


Definition at line 241 of file plain_server.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().


Definition at line 216 of file plain_server.cpp.
References zmq::msg_t::data, errno_assert, and zmq::msg_t::init_size().
Referenced by next_handshake_command().


|
private |
Definition at line 361 of file plain_server.cpp.
References zmq::msg_t::close(), EPROTO, errno_assert, zmq::mechanism_t::error, zmq::msg_t::init(), zmq::msg_t::more, zmq::mechanism_t::parse_metadata(), zmq::session_base_t::read_zap_msg(), session, zmq::mechanism_t::set_user_id(), size, and status_code.
Referenced by process_hello(), and zap_msg_available().


|
private |
Definition at line 284 of file plain_server.cpp.
References zmq::msg_t::data, errno_assert, zmq::options_t::identity, zmq::options_t::identity_size, zmq::msg_t::init(), zmq::msg_t::init_size(), zmq::msg_t::more, zmq::mechanism_t::options, peer_address, session, zmq::msg_t::set_flags(), zmq::session_base_t::write_zap_msg(), and zmq::options_t::zap_domain.
Referenced by process_hello().


|
virtual |
Implements zmq::mechanism_t.
Definition at line 112 of file plain_server.cpp.
References zmq::mechanism_t::error, error_command_sent, zmq::mechanism_t::handshaking, zmq::mechanism_t::ready, ready, and state.
|
virtual |
Reimplemented from zmq::mechanism_t.
Definition at line 123 of file plain_server.cpp.
References EFSM, receive_and_process_zap_reply(), sending_error, sending_welcome, state, status_code, and waiting_for_zap_reply.

|
private |
Definition at line 72 of file plain_server.hpp.
Referenced by send_zap_request().
|
private |
Definition at line 70 of file plain_server.hpp.
Referenced by process_hello(), receive_and_process_zap_reply(), and send_zap_request().
|
private |
Definition at line 77 of file plain_server.hpp.
Referenced by next_handshake_command(), process_handshake_command(), process_hello(), process_initiate(), status(), and zap_msg_available().
|
private |
Definition at line 75 of file plain_server.hpp.
Referenced by process_hello(), produce_error(), receive_and_process_zap_reply(), and zap_msg_available().