Asio based endpoint transport component. More...
#include <base.hpp>
Public Types | |
typedef endpoint< config > | type |
Type of this endpoint transport component. More... | |
typedef config::concurrency_type | concurrency_type |
Type of the concurrency policy. More... | |
typedef config::socket_type | socket_type |
Type of the socket policy. More... | |
typedef config::elog_type | elog_type |
Type of the error logging policy. More... | |
typedef config::alog_type | alog_type |
Type of the access logging policy. More... | |
typedef socket_type::socket_con_type | socket_con_type |
Type of the socket connection component. More... | |
typedef socket_con_type::ptr | socket_con_ptr |
Type of a shared pointer to the socket connection component. More... | |
typedef asio::connection< config > | transport_con_type |
Type of the connection transport component associated with this endpoint transport component. More... | |
typedef transport_con_type::ptr | transport_con_ptr |
Type of a shared pointer to the connection transport component associated with this endpoint transport component. More... | |
typedef lib::asio::io_service * | io_service_ptr |
Type of a pointer to the ASIO io_service being used. More... | |
typedef lib::shared_ptr< lib::asio::ip::tcp::acceptor > | acceptor_ptr |
Type of a shared pointer to the acceptor being used. More... | |
typedef lib::shared_ptr< lib::asio::ip::tcp::resolver > | resolver_ptr |
Type of a shared pointer to the resolver being used. More... | |
typedef lib::shared_ptr< lib::asio::steady_timer > | timer_ptr |
Type of timer handle. More... | |
typedef lib::shared_ptr< lib::asio::io_service::work > | work_ptr |
Type of a shared pointer to an io_service work object. More... | |
Public Types inherited from websocketpp::transport::asio::tls_socket::endpoint | |
typedef endpoint | type |
The type of this endpoint socket component. More... | |
typedef connection | socket_con_type |
The type of the corresponding connection socket component. More... | |
typedef socket_con_type::ptr | socket_con_ptr |
The type of a shared pointer to the corresponding connection socket component. More... | |
Public Member Functions | |
endpoint () | |
~endpoint () | |
bool | is_secure () const |
Return whether or not the endpoint produces secure connections. More... | |
void | init_asio (io_service_ptr ptr, lib::error_code &ec) |
initialize asio transport with external io_service (exception free) More... | |
void | init_asio (io_service_ptr ptr) |
initialize asio transport with external io_service More... | |
void | init_asio (lib::error_code &ec) |
Initialize asio transport with internal io_service (exception free) More... | |
void | init_asio () |
Initialize asio transport with internal io_service. More... | |
void | set_tcp_pre_init_handler (tcp_init_handler h) |
Sets the tcp pre init handler. More... | |
void | set_tcp_init_handler (tcp_init_handler h) |
Sets the tcp pre init handler (deprecated) More... | |
void | set_tcp_post_init_handler (tcp_init_handler h) |
Sets the tcp post init handler. More... | |
void | set_listen_backlog (int backlog) |
Sets the maximum length of the queue of pending connections. More... | |
void | set_reuse_addr (bool value) |
Sets whether to use the SO_REUSEADDR flag when opening listening sockets. More... | |
lib::asio::io_service & | get_io_service () |
Retrieve a reference to the endpoint's io_service. More... | |
lib::asio::ip::tcp::endpoint | get_local_endpoint (lib::asio::error_code &ec) |
Get local TCP endpoint. More... | |
void | listen (lib::asio::ip::tcp::endpoint const &ep, lib::error_code &ec) |
Set up endpoint for listening manually (exception free) More... | |
void | listen (lib::asio::ip::tcp::endpoint const &ep) |
Set up endpoint for listening manually. More... | |
template<typename InternetProtocol > | |
void | listen (InternetProtocol const &internet_protocol, uint16_t port, lib::error_code &ec) |
Set up endpoint for listening with protocol and port (exception free) More... | |
template<typename InternetProtocol > | |
void | listen (InternetProtocol const &internet_protocol, uint16_t port) |
Set up endpoint for listening with protocol and port. More... | |
void | listen (uint16_t port, lib::error_code &ec) |
Set up endpoint for listening on a port (exception free) More... | |
void | listen (uint16_t port) |
Set up endpoint for listening on a port. More... | |
void | listen (std::string const &host, std::string const &service, lib::error_code &ec) |
Set up endpoint for listening on a host and service (exception free) More... | |
void | listen (std::string const &host, std::string const &service) |
Set up endpoint for listening on a host and service. More... | |
void | stop_listening (lib::error_code &ec) |
Stop listening (exception free) More... | |
void | stop_listening () |
Stop listening. More... | |
bool | is_listening () const |
Check if the endpoint is listening. More... | |
std::size_t | run () |
wraps the run method of the internal io_service object More... | |
std::size_t | run_one () |
wraps the run_one method of the internal io_service object More... | |
void | stop () |
wraps the stop method of the internal io_service object More... | |
std::size_t | poll () |
wraps the poll method of the internal io_service object More... | |
std::size_t | poll_one () |
wraps the poll_one method of the internal io_service object More... | |
void | reset () |
wraps the reset method of the internal io_service object More... | |
bool | stopped () const |
wraps the stopped method of the internal io_service object More... | |
void | start_perpetual () |
Marks the endpoint as perpetual, stopping it from exiting when empty. More... | |
void | stop_perpetual () |
Clears the endpoint's perpetual flag, allowing it to exit when empty. More... | |
timer_ptr | set_timer (long duration, timer_handler callback) |
Call back a function after a period of time. More... | |
void | handle_timer (timer_ptr, timer_handler callback, lib::asio::error_code const &ec) |
Timer handler. More... | |
void | async_accept (transport_con_ptr tcon, accept_handler callback, lib::error_code &ec) |
Accept the next connection attempt and assign it to con (exception free) More... | |
void | async_accept (transport_con_ptr tcon, accept_handler callback) |
Accept the next connection attempt and assign it to con. More... | |
Public Member Functions inherited from websocketpp::transport::asio::tls_socket::endpoint | |
endpoint () | |
bool | is_secure () const |
Checks whether the endpoint creates secure connections. More... | |
void | set_socket_init_handler (socket_init_handler h) |
Set socket init handler. More... | |
void | set_tls_init_handler (tls_init_handler h) |
Set TLS init handler. More... | |
Protected Member Functions | |
void | init_logging (alog_type *a, elog_type *e) |
Initialize logging. More... | |
void | handle_accept (accept_handler callback, lib::asio::error_code const &asio_ec) |
void | async_connect (transport_con_ptr tcon, uri_ptr u, connect_handler cb) |
Initiate a new connection. More... | |
void | handle_resolve_timeout (timer_ptr, connect_handler callback, lib::error_code const &ec) |
DNS resolution timeout handler. More... | |
void | handle_resolve (transport_con_ptr tcon, timer_ptr dns_timer, connect_handler callback, lib::asio::error_code const &ec, lib::asio::ip::tcp::resolver::iterator iterator) |
void | handle_connect_timeout (transport_con_ptr tcon, timer_ptr, connect_handler callback, lib::error_code const &ec) |
Asio connect timeout handler. More... | |
void | handle_connect (transport_con_ptr tcon, timer_ptr con_timer, connect_handler callback, lib::asio::error_code const &ec) |
lib::error_code | init (transport_con_ptr tcon) |
Initialize a connection. More... | |
Protected Member Functions inherited from websocketpp::transport::asio::tls_socket::endpoint | |
lib::error_code | init (socket_con_ptr scon) |
Initialize a connection. More... | |
Asio based endpoint transport component.
transport::asio::endpoint implements an endpoint transport component using Asio.
typedef endpoint<config> websocketpp::transport::asio::endpoint< config >::type |
Type of this endpoint transport component.
Definition at line 56 of file endpoint.hpp.
typedef config::concurrency_type websocketpp::transport::asio::endpoint< config >::concurrency_type |
Type of the concurrency policy.
Definition at line 59 of file endpoint.hpp.
typedef config::socket_type websocketpp::transport::asio::endpoint< config >::socket_type |
Type of the socket policy.
Definition at line 61 of file endpoint.hpp.
typedef config::elog_type websocketpp::transport::asio::endpoint< config >::elog_type |
Type of the error logging policy.
Definition at line 63 of file endpoint.hpp.
typedef config::alog_type websocketpp::transport::asio::endpoint< config >::alog_type |
Type of the access logging policy.
Definition at line 65 of file endpoint.hpp.
typedef socket_type::socket_con_type websocketpp::transport::asio::endpoint< config >::socket_con_type |
Type of the socket connection component.
Definition at line 68 of file endpoint.hpp.
typedef socket_con_type::ptr websocketpp::transport::asio::endpoint< config >::socket_con_ptr |
Type of a shared pointer to the socket connection component.
Definition at line 70 of file endpoint.hpp.
typedef asio::connection<config> websocketpp::transport::asio::endpoint< config >::transport_con_type |
Type of the connection transport component associated with this endpoint transport component.
Definition at line 74 of file endpoint.hpp.
typedef transport_con_type::ptr websocketpp::transport::asio::endpoint< config >::transport_con_ptr |
Type of a shared pointer to the connection transport component associated with this endpoint transport component.
Definition at line 77 of file endpoint.hpp.
typedef lib::asio::io_service* websocketpp::transport::asio::endpoint< config >::io_service_ptr |
Type of a pointer to the ASIO io_service being used.
Definition at line 80 of file endpoint.hpp.
typedef lib::shared_ptr<lib::asio::ip::tcp::acceptor> websocketpp::transport::asio::endpoint< config >::acceptor_ptr |
Type of a shared pointer to the acceptor being used.
Definition at line 82 of file endpoint.hpp.
typedef lib::shared_ptr<lib::asio::ip::tcp::resolver> websocketpp::transport::asio::endpoint< config >::resolver_ptr |
Type of a shared pointer to the resolver being used.
Definition at line 84 of file endpoint.hpp.
typedef lib::shared_ptr<lib::asio::steady_timer> websocketpp::transport::asio::endpoint< config >::timer_ptr |
Type of timer handle.
Definition at line 86 of file endpoint.hpp.
typedef lib::shared_ptr<lib::asio::io_service::work> websocketpp::transport::asio::endpoint< config >::work_ptr |
Type of a shared pointer to an io_service work object.
Definition at line 88 of file endpoint.hpp.
|
inlineexplicit |
Definition at line 91 of file endpoint.hpp.
Referenced by websocketpp::endpoint< connection< websocketpp::config::asio >, websocketpp::config::asio >::~endpoint(), and websocketpp::transport::asio::endpoint< config >::~endpoint().
|
inline |
Definition at line 101 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::endpoint().
|
inline |
Return whether or not the endpoint produces secure connections.
Definition at line 168 of file endpoint.hpp.
References websocketpp::transport::asio::tls_socket::endpoint::is_secure().
Referenced by websocketpp::client< websocketpp::config::asio_client >::get_connection().
|
inline |
initialize asio transport with external io_service (exception free)
Initialize the ASIO transport policy for this endpoint using the provided io_service object. asio_init must be called exactly once on any endpoint that uses transport::asio before it can be used.
ptr | A pointer to the io_service to use for asio events |
ec | Set to indicate what error occurred, if any. |
Definition at line 181 of file endpoint.hpp.
References websocketpp::log::alevel::devel, websocketpp::error::invalid_state, websocketpp::log::elevel::library, websocketpp::error::make_error_code(), and websocketpp::log::stub::write().
Referenced by BOOST_AUTO_TEST_CASE(), broadcast_server::broadcast_server(), count_server::count_server(), main(), perftest::perftest(), run_client(), run_server(), run_time_limited_client(), telemetry_client::telemetry_client(), telemetry_server::telemetry_server(), utility_server::utility_server(), websocket_endpoint::websocket_endpoint(), and nfd::face::WebSocketChannel::WebSocketChannel().
|
inline |
initialize asio transport with external io_service
Initialize the ASIO transport policy for this endpoint using the provided io_service object. asio_init must be called exactly once on any endpoint that uses transport::asio before it can be used.
ptr | A pointer to the io_service to use for asio events |
Definition at line 209 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::init_asio().
|
inline |
Initialize asio transport with internal io_service (exception free)
This method of initialization will allocate and use an internally managed io_service.
ec | Set to indicate what error occurred, if any. |
Definition at line 224 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::init_asio().
|
inline |
Initialize asio transport with internal io_service.
This method of initialization will allocate and use an internally managed io_service.
Definition at line 246 of file endpoint.hpp.
Referenced by websocketpp::transport::asio::endpoint< config >::init_asio().
|
inline |
Sets the tcp pre init handler.
The tcp pre init handler is called after the raw tcp connection has been established but before any additional wrappers (proxy connects, TLS handshakes, etc) have been performed.
h | The handler to call on tcp pre init. |
Definition at line 272 of file endpoint.hpp.
Referenced by websocketpp::transport::asio::endpoint< config >::set_tcp_init_handler().
|
inline |
Sets the tcp pre init handler (deprecated)
The tcp pre init handler is called after the raw tcp connection has been established but before any additional wrappers (proxy connects, TLS handshakes, etc) have been performed.
h | The handler to call on tcp pre init. |
Definition at line 286 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::set_tcp_pre_init_handler().
|
inline |
Sets the tcp post init handler.
The tcp post init handler is called after the tcp connection has been established and all additional wrappers (proxy connects, TLS handshakes, etc have been performed. This is fired before any bytes are read or any WebSocket specific handshake logic has been performed.
h | The handler to call on tcp post init. |
Definition at line 301 of file endpoint.hpp.
|
inline |
Sets the maximum length of the queue of pending connections.
Sets the maximum length of the queue of pending connections. Increasing this will allow WebSocket++ to queue additional incoming connections. Setting it higher may prevent failed connections at high connection rates but may cause additional latency.
For this value to take effect you may need to adjust operating system settings.
New values affect future calls to listen only.
A value of zero will use the operating system default. This is the default value.
backlog | The maximum length of the queue of pending connections |
Definition at line 324 of file endpoint.hpp.
Referenced by main().
|
inline |
Sets whether to use the SO_REUSEADDR flag when opening listening sockets.
Specifies whether or not to use the SO_REUSEADDR TCP socket option. What this flag does depends on your operating system. Please consult operating system documentation for more details.
New values affect future calls to listen only.
The default is false.
value | Whether or not to use the SO_REUSEADDR option |
Definition at line 342 of file endpoint.hpp.
Referenced by main(), run_client(), run_server(), and nfd::face::WebSocketChannel::WebSocketChannel().
|
inline |
Retrieve a reference to the endpoint's io_service.
The io_service may be an internal or external one. This may be used to call methods of the io_service that are not explicitly wrapped by the endpoint.
This method is only valid after the endpoint has been initialized with init_asio
. No error will be returned if it isn't.
Definition at line 357 of file endpoint.hpp.
|
inline |
Get local TCP endpoint.
Extracts the local endpoint from the acceptor. This represents the address that WebSocket++ is listening on.
Sets a bad_descriptor error if the acceptor is not currently listening or otherwise unavailable.
ec | Set to indicate what error occurred, if any. |
Definition at line 374 of file endpoint.hpp.
References websocketpp::error::make_error_code().
|
inline |
Set up endpoint for listening manually (exception free)
Bind the internal acceptor using the specified settings. The endpoint must have been initialized by calling init_asio before listening.
ep | An endpoint to read settings from |
ec | Set to indicate what error occurred, if any. |
Definition at line 391 of file endpoint.hpp.
References websocketpp::log::alevel::devel, websocketpp::log::elevel::info, websocketpp::error::invalid_state, websocketpp::log::elevel::library, websocketpp::error::make_error_code(), websocketpp::transport::asio::error::pass_through, and websocketpp::log::stub::write().
Referenced by BOOST_AUTO_TEST_CASE(), nfd::face::WebSocketChannel::listen(), websocketpp::transport::asio::endpoint< config >::listen(), main(), broadcast_server::run(), count_server::run(), utility_server::run(), telemetry_server::run(), and run_server().
|
inline |
Set up endpoint for listening manually.
Bind the internal acceptor using the settings specified by the endpoint e
ep | An endpoint to read settings from |
Definition at line 433 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Set up endpoint for listening with protocol and port (exception free)
Bind the internal acceptor using the given internet protocol and port. The endpoint must have been initialized by calling init_asio before listening.
Common options include:
internet_protocol | The internet protocol to use. |
port | The port to listen on. |
ec | Set to indicate what error occurred, if any. |
Definition at line 454 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Set up endpoint for listening with protocol and port.
Bind the internal acceptor using the given internet protocol and port. The endpoint must have been initialized by calling init_asio before listening.
Common options include:
internet_protocol | The internet protocol to use. |
port | The port to listen on. |
Definition at line 475 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Set up endpoint for listening on a port (exception free)
Bind the internal acceptor using the given port. The IPv6 protocol with mapped IPv4 for dual stack hosts will be used. If you need IPv4 only use the overload that allows specifying the protocol explicitly.
The endpoint must have been initialized by calling init_asio before listening.
port | The port to listen on. |
ec | Set to indicate what error occurred, if any. |
Definition at line 493 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Set up endpoint for listening on a port.
Bind the internal acceptor using the given port. The IPv6 protocol with mapped IPv4 for dual stack hosts will be used. If you need IPv4 only use the overload that allows specifying the protocol explicitly.
The endpoint must have been initialized by calling init_asio before listening.
port | The port to listen on. |
ec | Set to indicate what error occurred, if any. |
Definition at line 509 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Set up endpoint for listening on a host and service (exception free)
Bind the internal acceptor using the given host and service. More details about what host and service can be are available in the Asio documentation for ip::basic_resolver_query::basic_resolver_query's constructors.
The endpoint must have been initialized by calling init_asio before listening.
host | A string identifying a location. May be a descriptive name or a numeric address string. |
service | A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. |
ec | Set to indicate what error occurred, if any. |
Definition at line 529 of file endpoint.hpp.
References websocketpp::transport::asio::error::invalid_host_service, websocketpp::log::elevel::library, websocketpp::transport::asio::endpoint< config >::listen(), websocketpp::error::make_error_code(), and websocketpp::log::stub::write().
|
inline |
Set up endpoint for listening on a host and service.
Bind the internal acceptor using the given host and service. More details about what host and service can be are available in the Asio documentation for ip::basic_resolver_query::basic_resolver_query's constructors.
The endpoint must have been initialized by calling init_asio before listening.
host | A string identifying a location. May be a descriptive name or a numeric address string. |
service | A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. |
ec | Set to indicate what error occurred, if any. |
Definition at line 562 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::listen().
|
inline |
Stop listening (exception free)
Stop listening and accepting new connections. This will not end any existing connections.
ec | A status code indicating an error, if any. |
Definition at line 577 of file endpoint.hpp.
References websocketpp::error::invalid_state, websocketpp::log::elevel::library, websocketpp::error::make_error_code(), and websocketpp::log::stub::write().
Referenced by cancel_on_open(), and on_message().
|
inline |
Stop listening.
Stop listening and accepting new connections. This will not end any existing connections.
Definition at line 598 of file endpoint.hpp.
|
inline |
Check if the endpoint is listening.
Definition at line 608 of file endpoint.hpp.
Referenced by websocketpp::server< websocketpp::config::asio >::start_accept(), and nfd::face::WebSocketChannel::WebSocketChannel().
|
inline |
wraps the run method of the internal io_service object
Definition at line 613 of file endpoint.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), main(), broadcast_server::run(), telemetry_client::run(), count_server::run(), utility_server::run(), telemetry_server::run(), run_client(), run_client_and_mark(), run_server(), run_time_limited_client(), perftest::start(), and websocket_endpoint::websocket_endpoint().
|
inline |
wraps the run_one method of the internal io_service object
Definition at line 621 of file endpoint.hpp.
|
inline |
wraps the stop method of the internal io_service object
Definition at line 626 of file endpoint.hpp.
Referenced by stop_on_close().
|
inline |
wraps the poll method of the internal io_service object
Definition at line 631 of file endpoint.hpp.
|
inline |
wraps the poll_one method of the internal io_service object
Definition at line 636 of file endpoint.hpp.
|
inline |
wraps the reset method of the internal io_service object
Definition at line 641 of file endpoint.hpp.
Referenced by main().
|
inline |
wraps the stopped method of the internal io_service object
Definition at line 646 of file endpoint.hpp.
|
inline |
Marks the endpoint as perpetual, stopping it from exiting when empty.
Marks the endpoint as perpetual. Perpetual endpoints will not automatically exit when they run out of connections to process. To stop a perpetual endpoint call end_perpetual
.
An endpoint may be marked perpetual at any time by any thread. It must be called either before the endpoint has run out of work or before it was started
Definition at line 662 of file endpoint.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and websocket_endpoint::websocket_endpoint().
|
inline |
Clears the endpoint's perpetual flag, allowing it to exit when empty.
Clears the endpoint's perpetual flag. This will cause the endpoint's run method to exit normally when it runs out of connections. If there are currently active connections it will not end until they are complete.
Definition at line 676 of file endpoint.hpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Call back a function after a period of time.
Sets a timer that calls back a function after the specified period of milliseconds. Returns a handle that can be used to cancel the timer. A cancelled timer will return the error code error::operation_aborted A timer that expired will return no error.
duration | Length of time to wait in milliseconds |
callback | The function to call back when the timer has expired |
Definition at line 692 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::handle_timer(), and websocketpp::lib::asio::milliseconds().
Referenced by telemetry_server::set_timer().
|
inline |
Timer handler.
The timer pointer is included to ensure the timer isn't destroyed until after it has expired.
t | Pointer to the timer in question |
callback | The function to call back |
ec | A status code indicating an error, if any. |
Definition at line 720 of file endpoint.hpp.
References websocketpp::log::elevel::info, websocketpp::error::make_error_code(), websocketpp::transport::error::operation_aborted, websocketpp::transport::asio::error::pass_through, and websocketpp::log::stub::write().
Referenced by websocketpp::transport::asio::endpoint< config >::set_timer().
|
inline |
Accept the next connection attempt and assign it to con (exception free)
tcon | The connection to accept into. |
callback | The function to call when the operation is complete. |
ec | A status code indicating an error, if any. |
Definition at line 743 of file endpoint.hpp.
References websocketpp::error::async_accept_not_listening, websocketpp::log::alevel::devel, config::enable_multithreading, websocketpp::transport::asio::endpoint< config >::handle_accept(), websocketpp::error::make_error_code(), and websocketpp::log::stub::write().
Referenced by websocketpp::transport::asio::endpoint< config >::async_accept(), and websocketpp::server< websocketpp::config::asio >::start_accept().
|
inline |
Accept the next connection attempt and assign it to con.
tcon | The connection to accept into. |
callback | The function to call when the operation is complete. |
Definition at line 782 of file endpoint.hpp.
References websocketpp::transport::asio::endpoint< config >::async_accept().
|
inlineprotected |
Initialize logging.
The loggers are located in the main endpoint class. As such, the transport doesn't have direct access to them. This method is called by the endpoint constructor to allow shared logging from the transport component. These are raw pointers to member variables of the endpoint. In particular, they cannot be used in the transport constructor as they haven't been constructed yet, and cannot be used in the transport destructor as they will have been destroyed by then.
Definition at line 798 of file endpoint.hpp.
Referenced by websocketpp::endpoint< connection< websocketpp::config::asio >, websocketpp::config::asio >::endpoint().
|
inlineprotected |
Definition at line 803 of file endpoint.hpp.
References websocketpp::log::alevel::devel, websocketpp::log::elevel::info, websocketpp::error::make_error_code(), websocketpp::error::operation_canceled, websocketpp::transport::asio::error::pass_through, and websocketpp::log::stub::write().
Referenced by websocketpp::transport::asio::endpoint< config >::async_accept().
|
inlineprotected |
Initiate a new connection.
Definition at line 824 of file endpoint.hpp.
References websocketpp::log::alevel::devel, config::enable_multithreading, websocketpp::transport::asio::endpoint< config >::handle_resolve(), websocketpp::transport::asio::endpoint< config >::handle_resolve_timeout(), websocketpp::error::make_error_code(), websocketpp::transport::asio::error::proxy_invalid, and config::timeout_dns_resolve.
Referenced by websocketpp::client< websocketpp::config::asio_client >::connect().
|
inlineprotected |
DNS resolution timeout handler.
The timer pointer is included to ensure the timer isn't destroyed until after it has expired.
dns_timer | Pointer to the timer in question |
callback | The function to call back |
ec | A status code indicating an error, if any. |
Definition at line 920 of file endpoint.hpp.
References websocketpp::log::elevel::devel, websocketpp::log::alevel::devel, websocketpp::error::make_error_code(), websocketpp::transport::error::operation_aborted, and websocketpp::transport::error::timeout.
Referenced by websocketpp::transport::asio::endpoint< config >::async_connect().
|
inlineprotected |
Definition at line 943 of file endpoint.hpp.
References websocketpp::log::alevel::devel, config::enable_multithreading, websocketpp::transport::asio::endpoint< config >::handle_connect(), websocketpp::transport::asio::endpoint< config >::handle_connect_timeout(), websocketpp::log::elevel::info, websocketpp::lib::asio::is_neg(), websocketpp::error::make_error_code(), websocketpp::transport::error::operation_aborted, websocketpp::transport::asio::error::pass_through, and config::timeout_connect.
Referenced by websocketpp::transport::asio::endpoint< config >::async_connect().
|
inlineprotected |
Asio connect timeout handler.
The timer pointer is included to ensure the timer isn't destroyed until after it has expired.
tcon | Pointer to the transport connection that is being connected |
con_timer | Pointer to the timer in question |
callback | The function to call back |
ec | A status code indicating an error, if any. |
Definition at line 1029 of file endpoint.hpp.
References websocketpp::log::elevel::devel, websocketpp::log::alevel::devel, websocketpp::error::make_error_code(), websocketpp::transport::error::operation_aborted, and websocketpp::transport::error::timeout.
Referenced by websocketpp::transport::asio::endpoint< config >::handle_resolve().
|
inlineprotected |
Definition at line 1052 of file endpoint.hpp.
References websocketpp::log::alevel::devel, websocketpp::log::elevel::info, websocketpp::lib::asio::is_neg(), websocketpp::error::make_error_code(), websocketpp::transport::error::operation_aborted, and websocketpp::transport::asio::error::pass_through.
Referenced by websocketpp::transport::asio::endpoint< config >::handle_resolve().
|
inlineprotected |
Initialize a connection.
init is called by an endpoint once for each newly created connection. It's purpose is to give the transport policy the chance to perform any transport specific initialization that couldn't be done via the default constructor.
tcon | A pointer to the transport portion of the connection. |
Definition at line 1089 of file endpoint.hpp.
References websocketpp::log::alevel::devel, and websocketpp::transport::asio::tls_socket::endpoint::init().