Basic 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 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::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 Asio connection socket component.
transport::asio::basic_socket::connection implements a connection socket component using Asio ip::tcp::socket.
Definition at line 57 of file none.hpp.
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 115 of file none.hpp.
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 123 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 137 of file none.hpp.
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 107 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 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 164 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 87 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 223 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 200 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 234 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 99 of file none.hpp.
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 189 of file none.hpp.
lib::error_code websocketpp::transport::asio::basic_socket::connection::translate_ec |
( |
lib::asio::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 265 of file none.hpp.
The documentation for this class was generated from the following file:
- websocketpp/transport/asio/security/none.hpp