Basic Boost ASIO connection socket component.
More...
#include <none.hpp>
|
typedef connection | type |
| Type of this connection socket component.
|
|
typedef lib::shared_ptr< type > | ptr |
| Type of a shared pointer to this connection socket component.
|
|
typedef boost::asio::io_service * | io_service_ptr |
| Type of a pointer to the ASIO io_service being used.
|
|
typedef lib::shared_ptr
< boost::asio::io_service::strand > | strand_ptr |
| Type of a pointer to the ASIO io_service strand being used.
|
|
typedef
boost::asio::ip::tcp::socket | socket_type |
| Type of the ASIO socket being used.
|
|
typedef lib::shared_ptr
< socket_type > | socket_ptr |
| Type of a shared pointer to the socket being used.
|
|
Basic Boost ASIO connection socket component.
transport::asio::basic_socket::connection implements a connection socket component using Boost ASIO ip::tcp::socket.
Definition at line 54 of file none.hpp.
boost::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 112 of file none.hpp.
boost::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 120 of file none.hpp.
std::string websocketpp::transport::asio::basic_socket::connection::get_remote_endpoint |
( |
lib::error_code & |
ec | ) |
const |
|
inline |
Get the remote endpoint address.
The iostream transport has no information about the ultimate remote endpoint. It will return the string "iostream transport". To indicate this.
TODO: allow user settable remote endpoint addresses if this seems useful
- Returns
- A string identifying the address of the remote endpoint
Definition at line 134 of file none.hpp.
boost::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 104 of file none.hpp.
lib::error_code websocketpp::transport::asio::basic_socket::connection::init_asio |
( |
io_service_ptr |
service, |
|
|
strand_ptr |
, |
|
|
bool |
|
|
) |
| |
|
inlineprotected |
Perform one time initializations.
init_asio is called once immediately after construction to initialize boost::asio components to the io_service
- Parameters
-
service | A pointer to the endpoint's io_service |
strand | A shared pointer to the connection's asio strand |
is_server | Whether or not the endpoint is a server or not. |
Definition at line 161 of file none.hpp.
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 84 of file none.hpp.
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 207 of file none.hpp.
void websocketpp::transport::asio::basic_socket::connection::pre_init |
( |
init_handler |
callback | ) |
|
|
inlineprotected |
Pre-initialize security policy.
Called by the transport after a new connection is created to initialize the socket component of the connection. This method is not allowed to write any bytes to the wire. This initialization happens before any proxies or other intermediate wrappers are negotiated.
- Parameters
-
callback | Handler to call back with completion information |
Definition at line 184 of file none.hpp.
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 218 of file none.hpp.
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 96 of file none.hpp.
lib::error_code websocketpp::transport::asio::basic_socket::connection::translate_ec |
( |
boost::system::error_code |
| ) |
|
|
inlineprotected |
Translate any security policy specific information about an error code.
Translate_ec takes a boost error code and attempts to convert its value to an appropriate websocketpp error code. The plain socket policy does not presently provide any additional information so all 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 249 of file none.hpp.
The documentation for this class was generated from the following file:
- websocketpp/transport/asio/security/none.hpp