Basic Asio connection socket component.
More...
#include <none.hpp>
|
typedef connection | type |
| Type of this connection socket component. More...
|
|
typedef lib::shared_ptr< type > | ptr |
| Type of a shared pointer to this connection socket 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::io_service::strand > | strand_ptr |
| Type of a pointer to the Asio io_service strand being used. More...
|
|
typedef lib::asio::ip::tcp::socket | socket_type |
| Type of the ASIO socket being used. More...
|
|
typedef lib::shared_ptr< socket_type > | socket_ptr |
| Type of a shared pointer to the socket being used. More...
|
|
|
template<typename ErrorCodeType > |
static lib::error_code | translate_ec (ErrorCodeType) |
| Translate any security policy specific information about an error code. More...
|
|
static lib::error_code | translate_ec (lib::error_code ec) |
| Overload of translate_ec to catch cases where lib::error_code is the same type as lib::asio::error_code. More...
|
|
Basic Asio connection socket component.
transport::asio::basic_socket::connection implements a connection socket component using Asio ip::tcp::socket.
Definition at line 58 of file none.hpp.
◆ type
Type of this connection socket component.
Definition at line 61 of file none.hpp.
◆ ptr
Type of a shared pointer to this connection socket component.
Definition at line 63 of file none.hpp.
◆ io_service_ptr
Type of a pointer to the Asio io_service being used.
Definition at line 66 of file none.hpp.
◆ strand_ptr
Type of a pointer to the Asio io_service strand being used.
Definition at line 68 of file none.hpp.
◆ socket_type
Type of the ASIO socket being used.
Definition at line 70 of file none.hpp.
◆ socket_ptr
Type of a shared pointer to the socket being used.
Definition at line 72 of file none.hpp.
◆ connection()
websocketpp::transport::asio::basic_socket::connection::connection |
( |
| ) |
|
|
inlineexplicit |
◆ get_shared()
ptr websocketpp::transport::asio::basic_socket::connection::get_shared |
( |
| ) |
|
|
inline |
Get a shared pointer to this component.
Definition at line 80 of file none.hpp.
◆ is_secure()
bool websocketpp::transport::asio::basic_socket::connection::is_secure |
( |
| ) |
const |
|
inline |
Check whether or not this connection is secure.
- Returns
- Whether or not this connection is secure
Definition at line 88 of file none.hpp.
◆ set_socket_init_handler()
void websocketpp::transport::asio::basic_socket::connection::set_socket_init_handler |
( |
socket_init_handler |
h | ) |
|
|
inline |
Set the socket initialization handler.
The socket initialization handler is called after the socket object is created but before it is used. This gives the application a chance to set any Asio socket options it needs.
- Parameters
-
h | The new socket_init_handler |
Definition at line 100 of file none.hpp.
◆ get_socket()
lib::asio::ip::tcp::socket& websocketpp::transport::asio::basic_socket::connection::get_socket |
( |
| ) |
|
|
inline |
Retrieve a pointer to the underlying socket.
This is used internally. It can also be used to set socket options, etc
Definition at line 108 of file none.hpp.
◆ get_next_layer()
lib::asio::ip::tcp::socket& websocketpp::transport::asio::basic_socket::connection::get_next_layer |
( |
| ) |
|
|
inline |
Retrieve a pointer to the underlying socket.
This is used internally.
Definition at line 116 of file none.hpp.
◆ get_raw_socket()
lib::asio::ip::tcp::socket& websocketpp::transport::asio::basic_socket::connection::get_raw_socket |
( |
| ) |
|
|
inline |
Retrieve a pointer to the underlying socket.
This is used internally. It can also be used to set socket options, etc
Definition at line 124 of file none.hpp.
◆ get_remote_endpoint()
std::string websocketpp::transport::asio::basic_socket::connection::get_remote_endpoint |
( |
lib::error_code & |
ec | ) |
const |
|
inline |
◆ init_asio()
lib::error_code websocketpp::transport::asio::basic_socket::connection::init_asio |
( |
io_service_ptr |
service, |
|
|
strand_ptr |
, |
|
|
bool |
|
|
) |
| |
|
inlineprotected |
◆ set_uri()
void websocketpp::transport::asio::basic_socket::connection::set_uri |
( |
uri_ptr |
| ) |
|
|
inlineprotected |
Set uri hook.
Called by the transport as a connection is being established to provide the uri being connected to to the security/socket layer.
This socket policy doesn't use the uri so it is ignored.
- Since
- 0.6.0
- Parameters
-
Definition at line 194 of file none.hpp.
◆ pre_init()
void websocketpp::transport::asio::basic_socket::connection::pre_init |
( |
init_handler |
callback | ) |
|
|
inlineprotected |
◆ post_init()
void websocketpp::transport::asio::basic_socket::connection::post_init |
( |
init_handler |
callback | ) |
|
|
inlineprotected |
Post-initialize security policy.
Called by the transport after all intermediate proxies have been negotiated. This gives the security policy the chance to talk with the real remote endpoint for a bit before the websocket handshake.
- Parameters
-
callback | Handler to call back with completion information |
Definition at line 224 of file none.hpp.
◆ set_handle()
void websocketpp::transport::asio::basic_socket::connection::set_handle |
( |
connection_hdl |
hdl | ) |
|
|
inlineprotected |
Sets the connection handle.
The connection handle is passed to any handlers to identify the connection
- Parameters
-
Definition at line 235 of file none.hpp.
◆ cancel_socket()
lib::asio::error_code websocketpp::transport::asio::basic_socket::connection::cancel_socket |
( |
| ) |
|
|
inlineprotected |
Cancel all async operations on this socket.
Attempts to cancel all async operations on this socket and reports any failures.
NOTE: Windows XP and earlier do not support socket cancellation.
- Returns
- The error that occurred, if any.
Definition at line 248 of file none.hpp.
◆ async_shutdown()
◆ get_ec()
lib::error_code websocketpp::transport::asio::basic_socket::connection::get_ec |
( |
| ) |
const |
|
inlineprotected |
◆ translate_ec() [1/2]
template<typename ErrorCodeType >
static lib::error_code websocketpp::transport::asio::basic_socket::connection::translate_ec |
( |
ErrorCodeType |
| ) |
|
|
inlinestatic |
Translate any security policy specific information about an error code.
Translate_ec takes an Asio error code and attempts to convert its value to an appropriate websocketpp error code. In the case that the Asio and Websocketpp error types are the same (such as using boost::asio and boost::system_error or using standalone asio and std::system_error the code will be passed through natively.
In the case of a mismatch (boost::asio with std::system_error) a translated code will be returned. The plain socket policy does not have any additional information so all such errors will be reported as the generic transport pass_through error.
- Since
- 0.3.0
- Parameters
-
ec | The error code to translate_ec |
- Returns
- The translated error code
Definition at line 285 of file none.hpp.
References websocketpp::error::make_error_code(), and websocketpp::transport::error::pass_through.
◆ translate_ec() [2/2]
static lib::error_code websocketpp::transport::asio::basic_socket::connection::translate_ec |
( |
lib::error_code |
ec | ) |
|
|
inlinestatic |
Overload of translate_ec to catch cases where lib::error_code is the same type as lib::asio::error_code.
Definition at line 293 of file none.hpp.
The documentation for this class was generated from the following file:
- ndnSIM/NFD/websocketpp/websocketpp/transport/asio/security/none.hpp