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

#include <ws_engine.hpp>

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

Public Member Functions

 ws_engine_t (fd_t fd_, const options_t &options_, const endpoint_uri_pair_t &endpoint_uri_pair_, const ws_address_t &address_, bool client_)
 
 ~ws_engine_t ()
 
- Public Member Functions inherited from zmq::stream_engine_base_t
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 Member Functions

int decode_and_push (msg_t *msg_)
 
bool handshake ()
 
void plug_internal ()
 
int process_command_message (msg_t *msg_)
 
int produce_ping_message (msg_t *msg_)
 
int produce_pong_message (msg_t *msg_)
 
void start_ws_handshake ()
 
- Protected Member Functions inherited from zmq::stream_engine_base_t
virtual void error (error_reason_t reason_)
 
bool init_properties (properties_t &properties_)
 
int next_handshake_command (msg_t *msg_)
 
int process_handshake_command (msg_t *msg_)
 
virtual int process_heartbeat_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_)
 

Private Member Functions

bool client_handshake ()
 
int close_connection_after_close (msg_t *msg_)
 
int process_routing_id_msg (msg_t *msg_)
 
int produce_close_message (msg_t *msg_)
 
int produce_no_msg_after_close (msg_t *msg_)
 
int routing_id_msg (msg_t *msg_)
 
bool select_protocol (const char *protocol)
 
bool server_handshake ()
 

Private Attributes

ws_address_t _address
 
bool _client
 
ws_client_handshake_state_t _client_handshake_state
 
msg_t _close_msg
 
bool _header_connection_upgrade
 
char _header_name [MAX_HEADER_NAME_LENGTH+1]
 
int _header_name_position
 
bool _header_upgrade_websocket
 
char _header_value [MAX_HEADER_VALUE_LENGTH+1]
 
int _header_value_position
 
int _heartbeat_timeout
 
unsigned char _read_buffer [WS_BUFFER_SIZE]
 
ws_server_handshake_state_t _server_handshake_state
 
char _websocket_accept [MAX_HEADER_VALUE_LENGTH+1]
 
char _websocket_key [MAX_HEADER_VALUE_LENGTH+1]
 
char _websocket_protocol [256]
 
unsigned char _write_buffer [WS_BUFFER_SIZE]
 

Additional Inherited Members

- Public Types inherited from zmq::i_engine
enum  error_reason_t { protocol_error, connection_error, timeout_error }
 
- Protected Types inherited from zmq::stream_engine_base_t
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 Attributes inherited from zmq::stream_engine_base_t
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_)
 

Detailed Description

Definition at line 100 of file ws_engine.hpp.

Constructor & Destructor Documentation

◆ ws_engine_t()

zmq::ws_engine_t::ws_engine_t ( fd_t  fd_,
const options_t options_,
const endpoint_uri_pair_t endpoint_uri_pair_,
const ws_address_t address_,
bool  client_ 
)

Definition at line 63 of file ws_engine.cpp.

◆ ~ws_engine_t()

zmq::ws_engine_t::~ws_engine_t ( )

Definition at line 94 of file ws_engine.cpp.

Member Function Documentation

◆ client_handshake()

bool zmq::ws_engine_t::client_handshake ( )
private

Definition at line 540 of file ws_engine.cpp.

◆ close_connection_after_close()

int zmq::ws_engine_t::close_connection_after_close ( msg_t msg_)
private

Definition at line 937 of file ws_engine.cpp.

◆ decode_and_push()

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

Reimplemented from zmq::stream_engine_base_t.

Definition at line 886 of file ws_engine.cpp.

◆ handshake()

bool zmq::ws_engine_t::handshake ( )
protectedvirtual

Reimplemented from zmq::stream_engine_base_t.

Reimplemented in zmq::wss_engine_t.

Definition at line 233 of file ws_engine.cpp.

◆ plug_internal()

void zmq::ws_engine_t::plug_internal ( )
protectedvirtual

Reimplemented from zmq::stream_engine_base_t.

Reimplemented in zmq::wss_engine_t.

Definition at line 147 of file ws_engine.cpp.

◆ process_command_message()

int zmq::ws_engine_t::process_command_message ( msg_t msg_)
protectedvirtual

Reimplemented from zmq::stream_engine_base_t.

Definition at line 972 of file ws_engine.cpp.

◆ process_routing_id_msg()

int zmq::ws_engine_t::process_routing_id_msg ( msg_t msg_)
private

Definition at line 165 of file ws_engine.cpp.

◆ produce_close_message()

int zmq::ws_engine_t::produce_close_message ( msg_t msg_)
private

Definition at line 916 of file ws_engine.cpp.

◆ produce_no_msg_after_close()

int zmq::ws_engine_t::produce_no_msg_after_close ( msg_t msg_)
private

Definition at line 927 of file ws_engine.cpp.

◆ produce_ping_message()

int zmq::ws_engine_t::produce_ping_message ( msg_t msg_)
protectedvirtual

Reimplemented from zmq::stream_engine_base_t.

Definition at line 945 of file ws_engine.cpp.

◆ produce_pong_message()

int zmq::ws_engine_t::produce_pong_message ( msg_t msg_)
protectedvirtual

Reimplemented from zmq::stream_engine_base_t.

Definition at line 961 of file ws_engine.cpp.

◆ routing_id_msg()

int zmq::ws_engine_t::routing_id_msg ( msg_t msg_)
private

Definition at line 154 of file ws_engine.cpp.

◆ select_protocol()

bool zmq::ws_engine_t::select_protocol ( const char *  protocol)
private

Definition at line 183 of file ws_engine.cpp.

◆ server_handshake()

bool zmq::ws_engine_t::server_handshake ( )
private

Definition at line 260 of file ws_engine.cpp.

◆ start_ws_handshake()

void zmq::ws_engine_t::start_ws_handshake ( )
protected

Definition at line 99 of file ws_engine.cpp.

Member Data Documentation

◆ _address

ws_address_t zmq::ws_engine_t::_address
private

Definition at line 132 of file ws_engine.hpp.

◆ _client

bool zmq::ws_engine_t::_client
private

Definition at line 131 of file ws_engine.hpp.

◆ _client_handshake_state

ws_client_handshake_state_t zmq::ws_engine_t::_client_handshake_state
private

Definition at line 134 of file ws_engine.hpp.

◆ _close_msg

msg_t zmq::ws_engine_t::_close_msg
private

Definition at line 151 of file ws_engine.hpp.

◆ _header_connection_upgrade

bool zmq::ws_engine_t::_header_connection_upgrade
private

Definition at line 145 of file ws_engine.hpp.

◆ _header_name

char zmq::ws_engine_t::_header_name[MAX_HEADER_NAME_LENGTH+1]
private

Definition at line 139 of file ws_engine.hpp.

◆ _header_name_position

int zmq::ws_engine_t::_header_name_position
private

Definition at line 140 of file ws_engine.hpp.

◆ _header_upgrade_websocket

bool zmq::ws_engine_t::_header_upgrade_websocket
private

Definition at line 144 of file ws_engine.hpp.

◆ _header_value

char zmq::ws_engine_t::_header_value[MAX_HEADER_VALUE_LENGTH+1]
private

Definition at line 141 of file ws_engine.hpp.

◆ _header_value_position

int zmq::ws_engine_t::_header_value_position
private

Definition at line 142 of file ws_engine.hpp.

◆ _heartbeat_timeout

int zmq::ws_engine_t::_heartbeat_timeout
private

Definition at line 150 of file ws_engine.hpp.

◆ _read_buffer

unsigned char zmq::ws_engine_t::_read_buffer[WS_BUFFER_SIZE]
private

Definition at line 137 of file ws_engine.hpp.

◆ _server_handshake_state

ws_server_handshake_state_t zmq::ws_engine_t::_server_handshake_state
private

Definition at line 135 of file ws_engine.hpp.

◆ _websocket_accept

char zmq::ws_engine_t::_websocket_accept[MAX_HEADER_VALUE_LENGTH+1]
private

Definition at line 148 of file ws_engine.hpp.

◆ _websocket_key

char zmq::ws_engine_t::_websocket_key[MAX_HEADER_VALUE_LENGTH+1]
private

Definition at line 147 of file ws_engine.hpp.

◆ _websocket_protocol

char zmq::ws_engine_t::_websocket_protocol[256]
private

Definition at line 146 of file ws_engine.hpp.

◆ _write_buffer

unsigned char zmq::ws_engine_t::_write_buffer[WS_BUFFER_SIZE]
private

Definition at line 138 of file ws_engine.hpp.


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


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