Loading...
Searching...
No Matches
websocketpp::transport::asio::tls_socket::endpoint Class Reference

TLS enabled Asio endpoint socket component. More...

`#include <tls.hpp>`

## Public Types

typedef endpoint | type
| The type of this endpoint socket component.
typedef connection | socket_con_type
| The type of the corresponding connection socket component.
typedef socket_con_type::ptr | socket_con_ptr

## Public Member Functions

bool | is_secure () const
| Checks whether the endpoint creates secure connections.
void | set_socket_init_handler (socket_init_handler h)
| Set socket init handler.
void | set_tls_init_handler (tls_init_handler h)
| Set TLS init handler.

## Protected Member Functions

lib::error_code | init (socket_con_ptr scon)
| Initialize a connection.

## Detailed Description

TLS enabled Asio endpoint socket component.

transport::asio::tls_socket::endpoint implements a secure endpoint socket component that uses Asio's ssl::stream to wrap an ip::tcp::socket.

Definition at line 414 of file tls.hpp.

## Member Typedef Documentation

## socket_con_ptr

typedef socket_con_type::ptr websocketpp::transport::asio::tls_socket::endpoint::socket_con_ptr

The type of a shared pointer to the corresponding connection socket component.

Definition at line 423 of file tls.hpp.

## socket_con_type

typedef connection websocketpp::transport::asio::tls_socket::endpoint::socket_con_type

The type of the corresponding connection socket component.

Definition at line 420 of file tls.hpp.

## type

typedef endpoint websocketpp::transport::asio::tls_socket::endpoint::type

The type of this endpoint socket component.

Definition at line 417 of file tls.hpp.

## Constructor & Destructor Documentation

## endpoint()

websocketpp::transport::asio::tls_socket::endpoint::endpoint | ( |  | ) |

inline explicit

Definition at line 425 of file tls.hpp.

## Member Function Documentation

## init()

lib::error_code websocketpp::transport::asio::tls_socket::endpoint::init | ( | socket_con_ptr | scon | ) |

inline protected

Initialize a connection.

Called by the transport after a new connection is created to initialize the socket component of the connection.

Parameters

  scon | Pointer to the socket component of the connection

Returns
  Error code (empty on success)

Definition at line 469 of file tls.hpp.

## is_secure()

bool websocketpp::transport::asio::tls_socket::endpoint::is_secure | ( |  | ) | const

inline

Checks whether the endpoint creates secure connections.

Returns
  Whether or not the endpoint creates secure connections

Definition at line 431 of file tls.hpp.

## set_socket_init_handler()

void websocketpp::transport::asio::tls_socket::endpoint::set_socket_init_handler | ( | socket_init_handler | h | ) |

inline

Set socket init handler.

The socket init handler is called after a connection's socket is created but before it is used. This gives the end application an opportunity to set asio socket specific parameters.

Parameters

  h | The new socket_init_handler

Definition at line 443 of file tls.hpp.

## set_tls_init_handler()

void websocketpp::transport::asio::tls_socket::endpoint::set_tls_init_handler | ( | tls_init_handler | h | ) |

inline

Set TLS init handler.

The tls init handler is called when needed to request a TLS context for the library to use. A TLS init handler must be set and it must return a valid TLS context in order for this endpoint to be able to initialize TLS connections

Parameters

  h | The new tls_init_handler

Definition at line 456 of file tls.hpp.

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

- websocketpp/transport/asio/security/tls.hpp