|
Diag-Client-Lib
|
Class used to create a tls socket for server for handling transmission and reception of tcp message from driver. More...
#include <tls_server_.h>
Public Types | |
| using | TcpHandlerRead = std::function< void(message::tcp::TcpMessagePtr)> |
| Tcp function template used for reception. More... | |
| using | TcpAcceptor = boost::asio::ip::tcp::acceptor |
| Type alias for tcp acceptor. More... | |
Public Member Functions | |
| TlsServerSocket (std::string_view local_ip_address, std::uint16_t local_port_num) | |
| Constructs an instance of TlsServerSocket. More... | |
| ~TlsServerSocket ()=default | |
| Destruct an instance of TlsServerSocket. More... | |
| std::optional< TcpServerConnection > | GetTcpServerConnection (TcpHandlerRead tcp_handler_read) |
| Get the tcp connection to communicate. More... | |
Private Types | |
| using | Tcp = boost::asio::ip::tcp |
| Type alias for tcp protocol. More... | |
Private Attributes | |
| std::string | local_ip_address_ |
| Store local ip address. More... | |
| std::uint16_t | local_port_num_ |
| Store local port number. More... | |
| boost::asio::io_context | io_context_ |
| boost io context More... | |
| boost::asio::ssl::context | io_ssl_context_ |
| boost io ssl context More... | |
| TcpAcceptor | tcp_acceptor_ |
| Store tcp acceptor. More... | |
Class used to create a tls socket for server for handling transmission and reception of tcp message from driver.
Definition at line 121 of file tls_server_.h.
|
private |
Type alias for tcp protocol.
Definition at line 159 of file tls_server_.h.
| using boost_support::socket::tcp::TlsServerSocket::TcpAcceptor = boost::asio::ip::tcp::acceptor |
Type alias for tcp acceptor.
Definition at line 131 of file tls_server_.h.
| using boost_support::socket::tcp::TlsServerSocket::TcpHandlerRead = std::function<void(message::tcp::TcpMessagePtr)> |
Tcp function template used for reception.
Definition at line 126 of file tls_server_.h.
| boost_support::socket::tcp::TlsServerSocket::TlsServerSocket | ( | std::string_view | local_ip_address, |
| std::uint16_t | local_port_num | ||
| ) |
Constructs an instance of TlsServerSocket.
| [in] | local_ip_address | The local ip address |
| [in] | local_port_num | The local port number |
Definition at line 21 of file tls_server_.cpp.
References FILE_NAME, boost_support::common::logger::LibBoostLogger::GetLibBoostLogger(), and io_ssl_context_.

|
default |
Destruct an instance of TlsServerSocket.
| std::optional< TcpServerConnection > boost_support::socket::tcp::TlsServerSocket::GetTcpServerConnection | ( | TcpHandlerRead | tcp_handler_read | ) |
Get the tcp connection to communicate.
| [in] | tcp_handler_read | The local ip address |
Definition at line 40 of file tls_server_.cpp.
References FILE_NAME, boost_support::common::logger::LibBoostLogger::GetLibBoostLogger(), io_context_, io_ssl_context_, and tcp_acceptor_.

|
private |
boost io context
Definition at line 174 of file tls_server_.h.
Referenced by GetTcpServerConnection().
|
private |
boost io ssl context
Definition at line 179 of file tls_server_.h.
Referenced by GetTcpServerConnection(), and TlsServerSocket().
|
private |
Store local ip address.
Definition at line 164 of file tls_server_.h.
|
private |
Store local port number.
Definition at line 169 of file tls_server_.h.
|
private |
Store tcp acceptor.
Definition at line 184 of file tls_server_.h.
Referenced by GetTcpServerConnection().