Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
mock_con Struct Reference
Inheritance diagram for mock_con:
Collaboration diagram for mock_con:

Public Types

typedef websocketpp::transport::asio::connection< configbase
 
- Public Types inherited from websocketpp::transport::asio::connection< config >
typedef connection< configtype
 Type of this connection transport component.
 
typedef lib::shared_ptr< typeptr
 Type of a shared pointer to this connection transport component.
 
typedef config::socket_type::socket_con_type socket_con_type
 Type of the socket connection component.
 
typedef socket_con_type::ptr socket_con_ptr
 Type of a shared pointer to the socket connection component.
 
typedef config::alog_type alog_type
 Type of this transport's access logging policy.
 
typedef config::elog_type elog_type
 Type of this transport's error logging policy.
 
typedef config::request_type request_type
 
typedef request_type::ptr request_ptr
 
typedef config::response_type response_type
 
typedef response_type::ptr response_ptr
 
typedef lib::asio::io_service * io_service_ptr
 Type of a pointer to the Asio io_service being used.
 
typedef lib::shared_ptr< lib::asio::io_service::strand > strand_ptr
 Type of a pointer to the Asio io_service::strand being used.
 
typedef lib::shared_ptr< lib::asio::steady_timertimer_ptr
 Type of a pointer to the Asio timer class.
 

Public Member Functions

 mock_con (bool a, config::alog_type &b, config::elog_type &c)
 
void start ()
 
void handle_start (const websocketpp::lib::error_code &ec)
 
- Public Member Functions inherited from websocketpp::transport::asio::connection< config >
 connection (bool is_server, alog_type &alog, elog_type &elog)
 
ptr get_shared ()
 Get a shared pointer to this component.
 
bool is_secure () const
 
void set_uri (uri_ptr u)
 Set uri hook.
 
void set_tcp_pre_init_handler (tcp_init_handler h)
 Sets the tcp pre init handler.
 
void set_tcp_init_handler (tcp_init_handler h)
 Sets the tcp pre init handler (deprecated)
 
void set_tcp_post_init_handler (tcp_init_handler h)
 Sets the tcp post init handler.
 
void set_proxy (std::string const &uri, lib::error_code &ec)
 Set the proxy to connect through (exception free)
 
void set_proxy (std::string const &uri)
 Set the proxy to connect through (exception)
 
void set_proxy_basic_auth (std::string const &username, std::string const &password, lib::error_code &ec)
 Set the basic auth credentials to use (exception free)
 
void set_proxy_basic_auth (std::string const &username, std::string const &password)
 Set the basic auth credentials to use (exception)
 
void set_proxy_timeout (long duration, lib::error_code &ec)
 Set the proxy timeout duration (exception free)
 
void set_proxy_timeout (long duration)
 Set the proxy timeout duration (exception)
 
std::string const & get_proxy () const
 
std::string get_remote_endpoint () const
 Get the remote endpoint address.
 
connection_hdl get_handle () const
 Get the connection handle.
 
timer_ptr set_timer (long duration, timer_handler callback)
 Call back a function after a period of time.
 
void handle_timer (timer_ptr, timer_handler callback, lib::asio::error_code const &ec)
 Timer callback.
 
strand_ptr get_strand ()
 Get a pointer to this connection's strand.
 
lib::asio::error_code get_transport_ec () const
 Get the internal transport error code for a closed/failed connection.
 

Additional Inherited Members

- Protected Member Functions inherited from websocketpp::transport::asio::connection< config >
void init (init_handler callback)
 Initialize transport for reading.
 
lib::error_code proxy_init (std::string const &authority)
 initialize the proxy buffers and http parsers
 
lib::error_code init_asio (io_service_ptr io_service)
 Finish constructing the transport.
 
void handle_pre_init (init_handler callback, lib::error_code const &ec)
 
void post_init (init_handler callback)
 
void handle_post_init_timeout (timer_ptr, init_handler callback, lib::error_code const &ec)
 Post init timeout callback.
 
void handle_post_init (timer_ptr post_timer, init_handler callback, lib::error_code const &ec)
 Post init timeout callback.
 
void proxy_write (init_handler callback)
 
void handle_proxy_timeout (init_handler callback, lib::error_code const &ec)
 
void handle_proxy_write (init_handler callback, lib::asio::error_code const &ec)
 
void proxy_read (init_handler callback)
 
void handle_proxy_read (init_handler callback, lib::asio::error_code const &ec, size_t)
 Proxy read callback.
 
void async_read_at_least (size_t num_bytes, char *buf, size_t len, read_handler handler)
 read at least num_bytes bytes into buf and then call handler.
 
void handle_async_read (read_handler handler, lib::asio::error_code const &ec, size_t bytes_transferred)
 
void async_write (const char *buf, size_t len, write_handler handler)
 Initiate a potentially asyncronous write of the given buffer.
 
void async_write (std::vector< buffer > const &bufs, write_handler handler)
 Initiate a potentially asyncronous write of the given buffers.
 
void handle_async_write (write_handler handler, lib::asio::error_code const &ec, size_t)
 Async write callback.
 
void set_handle (connection_hdl hdl)
 Set Connection Handle.
 
lib::error_code interrupt (interrupt_handler handler)
 Trigger the on_interrupt handler.
 
lib::error_code dispatch (dispatch_handler handler)
 
void async_shutdown (shutdown_handler callback)
 close and clean up the underlying socket
 
void handle_async_shutdown_timeout (timer_ptr, init_handler callback, lib::error_code const &ec)
 Async shutdown timeout handler.
 
void handle_async_shutdown (timer_ptr shutdown_timer, shutdown_handler callback, lib::asio::error_code const &ec)
 
void cancel_socket_checked ()
 Cancel the underlying socket and log any errors.
 

Detailed Description

Definition at line 115 of file timers.cpp.

Member Typedef Documentation

◆ base

Constructor & Destructor Documentation

◆ mock_con()

mock_con::mock_con ( bool a,
config::alog_type & b,
config::elog_type & c )
inline

Definition at line 118 of file timers.cpp.

118: base(a,b,c) {}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
websocketpp::transport::asio::connection< config > base
Definition timers.cpp:116

Member Function Documentation

◆ handle_start()

void mock_con::handle_start ( const websocketpp::lib::error_code & ec)
inline

Definition at line 125 of file timers.cpp.

125 {
128
129 BOOST_CHECK_EQUAL( ec, make_error_code(tls_handshake_timeout) );
130
131 base::cancel_socket();
132 }
@ tls_handshake_timeout
TLS Handshake Timeout.
Definition base.hpp:93
lib::error_code make_error_code(error::value e)
Definition base.hpp:147
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void mock_con::start ( )
inline

Definition at line 120 of file timers.cpp.

120 {
121 base::init(websocketpp::lib::bind(&mock_con::handle_start,this,
122 websocketpp::lib::placeholders::_1));
123 }
void init(init_handler callback)
Initialize transport for reading.
void handle_start(const websocketpp::lib::error_code &ec)
Definition timers.cpp:125
Here is the call graph for this function:

The documentation for this struct was generated from the following file: