Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
zmq::stream_engine_base_t Class Reference

#include <stream_engine_base.hpp>

Inheritance diagram for zmq::stream_engine_base_t:
Inheritance graph
[legend]

Public Member Functions

const endpoint_uri_pair_tget_endpoint () const ZMQ_FINAL
 
bool has_handshake_stage () ZMQ_FINAL
 
void in_event () ZMQ_FINAL
 
void out_event () ZMQ_OVERRIDE
 
void plug (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_) ZMQ_FINAL
 
bool restart_input () ZMQ_FINAL
 
void restart_output () ZMQ_FINAL
 
 stream_engine_base_t (fd_t fd_, const options_t &options_, const endpoint_uri_pair_t &endpoint_uri_pair_, bool has_handshake_stage_)
 
void terminate () ZMQ_FINAL
 
void timer_event (int id_) ZMQ_FINAL
 
void zap_msg_available () ZMQ_FINAL
 
 ~stream_engine_base_t () ZMQ_OVERRIDE
 
- Public Member Functions inherited from zmq::io_object_t
 io_object_t (zmq::io_thread_t *io_thread_=NULL)
 
void plug (zmq::io_thread_t *io_thread_)
 
void unplug ()
 
 ~io_object_t () ZMQ_OVERRIDE
 
- Public Member Functions inherited from zmq::i_poll_events
virtual ~i_poll_events () ZMQ_DEFAULT
 
- Public Member Functions inherited from zmq::i_engine
virtual ~i_engine () ZMQ_DEFAULT
 

Protected Types

enum  { handshake_timer_id = 0x40 }
 
enum  { heartbeat_ivl_timer_id = 0x80, heartbeat_timeout_timer_id = 0x81, heartbeat_ttl_timer_id = 0x82 }
 
typedef metadata_t::dict_t properties_t
 
- Protected Types inherited from zmq::io_object_t
typedef poller_t::handle_t handle_t
 

Protected Member Functions

virtual int decode_and_push (msg_t *msg_)
 
virtual void error (error_reason_t reason_)
 
virtual bool handshake ()
 
bool init_properties (properties_t &properties_)
 
int next_handshake_command (msg_t *msg_)
 
virtual void plug_internal ()
 
virtual int process_command_message (msg_t *msg_)
 
int process_handshake_command (msg_t *msg_)
 
virtual int process_heartbeat_message (msg_t *msg_)
 
virtual int produce_ping_message (msg_t *msg_)
 
virtual int produce_pong_message (msg_t *msg_)
 
int pull_and_encode (msg_t *msg_)
 
int pull_msg_from_session (msg_t *msg_)
 
int push_msg_to_session (msg_t *msg_)
 
int push_one_then_decode_and_push (msg_t *msg_)
 
virtual int read (void *data, size_t size_)
 
void reset_pollout ()
 
session_base_tsession ()
 
void set_handshake_timer ()
 
void set_pollin ()
 
void set_pollout ()
 
socket_base_tsocket ()
 
virtual int write (const void *data_, size_t size_)
 
- Protected Member Functions inherited from zmq::io_object_t
handle_t add_fd (fd_t fd_)
 
void add_timer (int timeout_, int id_)
 
void cancel_timer (int id_)
 
void reset_pollin (handle_t handle_)
 
void reset_pollout (handle_t handle_)
 
void rm_fd (handle_t handle_)
 
void set_pollin (handle_t handle_)
 
void set_pollout (handle_t handle_)
 

Protected Attributes

i_decoder_decoder
 
i_encoder_encoder
 
const endpoint_uri_pair_t _endpoint_uri_pair
 
bool _has_handshake_timer
 
bool _has_heartbeat_timer
 
bool _has_timeout_timer
 
bool _has_ttl_timer
 
unsigned char * _inpos
 
bool _input_stopped
 
size_t _insize
 
mechanism_t_mechanism
 
metadata_t_metadata
 
int(stream_engine_base_t::* _next_msg )(msg_t *msg_)
 
const options_t _options
 
unsigned char * _outpos
 
bool _output_stopped
 
size_t _outsize
 
const std::string _peer_address
 
int(stream_engine_base_t::* _process_msg )(msg_t *msg_)
 

Private Member Functions

bool in_event_internal ()
 
void mechanism_ready ()
 
void unplug ()
 
int write_credential (msg_t *msg_)
 

Private Attributes

handle_t _handle
 
bool _handshaking
 
bool _has_handshake_stage
 
bool _io_error
 
bool _plugged
 
fd_t _s
 
zmq::session_base_t_session
 
zmq::socket_base_t_socket
 
msg_t _tx_msg
 

Additional Inherited Members

- Public Types inherited from zmq::i_engine
enum  error_reason_t { protocol_error, connection_error, timeout_error }
 

Detailed Description

Definition at line 28 of file stream_engine_base.hpp.

Member Typedef Documentation

◆ properties_t

Definition at line 53 of file stream_engine_base.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
handshake_timer_id 

Definition at line 132 of file stream_engine_base.hpp.

◆ anonymous enum

anonymous enum
protected
Enumerator
heartbeat_ivl_timer_id 
heartbeat_timeout_timer_id 
heartbeat_ttl_timer_id 

Definition at line 141 of file stream_engine_base.hpp.

Constructor & Destructor Documentation

◆ stream_engine_base_t()

zmq::stream_engine_base_t::stream_engine_base_t ( fd_t  fd_,
const options_t options_,
const endpoint_uri_pair_t endpoint_uri_pair_,
bool  has_handshake_stage_ 
)

Definition at line 75 of file stream_engine_base.cpp.

◆ ~stream_engine_base_t()

zmq::stream_engine_base_t::~stream_engine_base_t ( )

Definition at line 115 of file stream_engine_base.cpp.

Member Function Documentation

◆ decode_and_push()

int zmq::stream_engine_base_t::decode_and_push ( msg_t msg_)
protectedvirtual

Reimplemented in zmq::ws_engine_t.

Definition at line 618 of file stream_engine_base.cpp.

◆ error()

void zmq::stream_engine_base_t::error ( error_reason_t  reason_)
protectedvirtual

Definition at line 667 of file stream_engine_base.cpp.

◆ get_endpoint()

const zmq::endpoint_uri_pair_t & zmq::stream_engine_base_t::get_endpoint ( ) const
virtual

Implements zmq::i_engine.

Definition at line 507 of file stream_engine_base.cpp.

◆ handshake()

virtual bool zmq::stream_engine_base_t::handshake ( )
inlineprotectedvirtual

Reimplemented in zmq::ws_engine_t, and zmq::wss_engine_t.

Definition at line 71 of file stream_engine_base.hpp.

◆ has_handshake_stage()

bool zmq::stream_engine_base_t::has_handshake_stage ( )
inlinevirtual

Implements zmq::i_engine.

Definition at line 38 of file stream_engine_base.hpp.

◆ in_event()

void zmq::stream_engine_base_t::in_event ( )
virtual

Reimplemented from zmq::io_object_t.

Definition at line 213 of file stream_engine_base.cpp.

◆ in_event_internal()

bool zmq::stream_engine_base_t::in_event_internal ( )
private

Definition at line 220 of file stream_engine_base.cpp.

◆ init_properties()

bool zmq::stream_engine_base_t::init_properties ( properties_t properties_)
protected

Definition at line 719 of file stream_engine_base.cpp.

◆ mechanism_ready()

void zmq::stream_engine_base_t::mechanism_ready ( )
private

Definition at line 512 of file stream_engine_base.cpp.

◆ next_handshake_command()

int zmq::stream_engine_base_t::next_handshake_command ( msg_t msg_)
protected

Definition at line 453 of file stream_engine_base.cpp.

◆ out_event()

void zmq::stream_engine_base_t::out_event ( )
virtual

Reimplemented from zmq::io_object_t.

Reimplemented in zmq::wss_engine_t.

Definition at line 314 of file stream_engine_base.cpp.

◆ plug()

void zmq::stream_engine_base_t::plug ( zmq::io_thread_t *  io_thread_,
zmq::session_base_t session_ 
)
virtual

Implements zmq::i_engine.

Definition at line 152 of file stream_engine_base.cpp.

◆ plug_internal()

virtual void zmq::stream_engine_base_t::plug_internal ( )
inlineprotectedvirtual

Reimplemented in zmq::ws_engine_t, and zmq::wss_engine_t.

Definition at line 72 of file stream_engine_base.hpp.

◆ process_command_message()

virtual int zmq::stream_engine_base_t::process_command_message ( msg_t msg_)
inlineprotectedvirtual

Reimplemented in zmq::ws_engine_t.

Definition at line 74 of file stream_engine_base.hpp.

◆ process_handshake_command()

int zmq::stream_engine_base_t::process_handshake_command ( msg_t msg_)
protected

Definition at line 473 of file stream_engine_base.cpp.

◆ process_heartbeat_message()

virtual int zmq::stream_engine_base_t::process_heartbeat_message ( msg_t msg_)
inlineprotectedvirtual

Definition at line 84 of file stream_engine_base.hpp.

◆ produce_ping_message()

virtual int zmq::stream_engine_base_t::produce_ping_message ( msg_t msg_)
inlineprotectedvirtual

Reimplemented in zmq::ws_engine_t.

Definition at line 79 of file stream_engine_base.hpp.

◆ produce_pong_message()

virtual int zmq::stream_engine_base_t::produce_pong_message ( msg_t msg_)
inlineprotectedvirtual

Reimplemented in zmq::ws_engine_t.

Definition at line 89 of file stream_engine_base.hpp.

◆ pull_and_encode()

int zmq::stream_engine_base_t::pull_and_encode ( msg_t msg_)
protected

Definition at line 607 of file stream_engine_base.cpp.

◆ pull_msg_from_session()

int zmq::stream_engine_base_t::pull_msg_from_session ( msg_t msg_)
protected

Definition at line 657 of file stream_engine_base.cpp.

◆ push_msg_to_session()

int zmq::stream_engine_base_t::push_msg_to_session ( msg_t msg_)
protected

Definition at line 662 of file stream_engine_base.cpp.

◆ push_one_then_decode_and_push()

int zmq::stream_engine_base_t::push_one_then_decode_and_push ( msg_t msg_)
protected

Definition at line 649 of file stream_engine_base.cpp.

◆ read()

int zmq::stream_engine_base_t::read ( void data,
size_t  size_ 
)
protectedvirtual

Reimplemented in zmq::wss_engine_t.

Definition at line 756 of file stream_engine_base.cpp.

◆ reset_pollout()

void zmq::stream_engine_base_t::reset_pollout ( )
inlineprotected

Definition at line 98 of file stream_engine_base.hpp.

◆ restart_input()

bool zmq::stream_engine_base_t::restart_input ( )
virtual

Implements zmq::i_engine.

Definition at line 400 of file stream_engine_base.cpp.

◆ restart_output()

void zmq::stream_engine_base_t::restart_output ( )
virtual

Implements zmq::i_engine.

Definition at line 383 of file stream_engine_base.cpp.

◆ session()

session_base_t* zmq::stream_engine_base_t::session ( )
inlineprotected

Definition at line 101 of file stream_engine_base.hpp.

◆ set_handshake_timer()

void zmq::stream_engine_base_t::set_handshake_timer ( )
protected

Definition at line 709 of file stream_engine_base.cpp.

◆ set_pollin()

void zmq::stream_engine_base_t::set_pollin ( )
inlineprotected

Definition at line 100 of file stream_engine_base.hpp.

◆ set_pollout()

void zmq::stream_engine_base_t::set_pollout ( )
inlineprotected

Definition at line 99 of file stream_engine_base.hpp.

◆ socket()

socket_base_t* zmq::stream_engine_base_t::socket ( )
inlineprotected

Definition at line 102 of file stream_engine_base.hpp.

◆ terminate()

void zmq::stream_engine_base_t::terminate ( )
virtual

Implements zmq::i_engine.

Definition at line 207 of file stream_engine_base.cpp.

◆ timer_event()

void zmq::stream_engine_base_t::timer_event ( int  id_)
virtual

Reimplemented from zmq::io_object_t.

Definition at line 735 of file stream_engine_base.cpp.

◆ unplug()

void zmq::stream_engine_base_t::unplug ( )
private

Definition at line 172 of file stream_engine_base.cpp.

◆ write()

int zmq::stream_engine_base_t::write ( const void data_,
size_t  size_ 
)
protectedvirtual

Reimplemented in zmq::wss_engine_t.

Definition at line 769 of file stream_engine_base.cpp.

◆ write_credential()

int zmq::stream_engine_base_t::write_credential ( msg_t msg_)
private

Definition at line 584 of file stream_engine_base.cpp.

◆ zap_msg_available()

void zmq::stream_engine_base_t::zap_msg_available ( )
virtual

Implements zmq::i_engine.

Definition at line 491 of file stream_engine_base.cpp.

Member Data Documentation

◆ _decoder

i_decoder* zmq::stream_engine_base_t::_decoder
protected

Definition at line 108 of file stream_engine_base.hpp.

◆ _encoder

i_encoder* zmq::stream_engine_base_t::_encoder
protected

Definition at line 112 of file stream_engine_base.hpp.

◆ _endpoint_uri_pair

const endpoint_uri_pair_t zmq::stream_engine_base_t::_endpoint_uri_pair
protected

Definition at line 129 of file stream_engine_base.hpp.

◆ _handle

handle_t zmq::stream_engine_base_t::_handle
private

Definition at line 167 of file stream_engine_base.hpp.

◆ _handshaking

bool zmq::stream_engine_base_t::_handshaking
private

Definition at line 174 of file stream_engine_base.hpp.

◆ _has_handshake_stage

bool zmq::stream_engine_base_t::_has_handshake_stage
private

Definition at line 188 of file stream_engine_base.hpp.

◆ _has_handshake_timer

bool zmq::stream_engine_base_t::_has_handshake_timer
protected

Definition at line 138 of file stream_engine_base.hpp.

◆ _has_heartbeat_timer

bool zmq::stream_engine_base_t::_has_heartbeat_timer
protected

Definition at line 149 of file stream_engine_base.hpp.

◆ _has_timeout_timer

bool zmq::stream_engine_base_t::_has_timeout_timer
protected

Definition at line 148 of file stream_engine_base.hpp.

◆ _has_ttl_timer

bool zmq::stream_engine_base_t::_has_ttl_timer
protected

Definition at line 147 of file stream_engine_base.hpp.

◆ _inpos

unsigned char* zmq::stream_engine_base_t::_inpos
protected

Definition at line 106 of file stream_engine_base.hpp.

◆ _input_stopped

bool zmq::stream_engine_base_t::_input_stopped
protected

Definition at line 123 of file stream_engine_base.hpp.

◆ _insize

size_t zmq::stream_engine_base_t::_insize
protected

Definition at line 107 of file stream_engine_base.hpp.

◆ _io_error

bool zmq::stream_engine_base_t::_io_error
private

Definition at line 178 of file stream_engine_base.hpp.

◆ _mechanism

mechanism_t* zmq::stream_engine_base_t::_mechanism
protected

Definition at line 114 of file stream_engine_base.hpp.

◆ _metadata

metadata_t* zmq::stream_engine_base_t::_metadata
protected

Definition at line 120 of file stream_engine_base.hpp.

◆ _next_msg

int(stream_engine_base_t::* zmq::stream_engine_base_t::_next_msg) (msg_t *msg_)
protected

Definition at line 116 of file stream_engine_base.hpp.

◆ _options

const options_t zmq::stream_engine_base_t::_options
protected

Definition at line 104 of file stream_engine_base.hpp.

◆ _outpos

unsigned char* zmq::stream_engine_base_t::_outpos
protected

Definition at line 110 of file stream_engine_base.hpp.

◆ _output_stopped

bool zmq::stream_engine_base_t::_output_stopped
protected

Definition at line 126 of file stream_engine_base.hpp.

◆ _outsize

size_t zmq::stream_engine_base_t::_outsize
protected

Definition at line 111 of file stream_engine_base.hpp.

◆ _peer_address

const std::string zmq::stream_engine_base_t::_peer_address
protected

Definition at line 152 of file stream_engine_base.hpp.

◆ _plugged

bool zmq::stream_engine_base_t::_plugged
private

Definition at line 169 of file stream_engine_base.hpp.

◆ _process_msg

int(stream_engine_base_t::* zmq::stream_engine_base_t::_process_msg) (msg_t *msg_)
protected

Definition at line 117 of file stream_engine_base.hpp.

◆ _s

fd_t zmq::stream_engine_base_t::_s
private

Definition at line 165 of file stream_engine_base.hpp.

◆ _session

zmq::session_base_t* zmq::stream_engine_base_t::_session
private

Definition at line 181 of file stream_engine_base.hpp.

◆ _socket

zmq::socket_base_t* zmq::stream_engine_base_t::_socket
private

Definition at line 184 of file stream_engine_base.hpp.

◆ _tx_msg

msg_t zmq::stream_engine_base_t::_tx_msg
private

Definition at line 176 of file stream_engine_base.hpp.


The documentation for this class was generated from the following files:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:11