Diag-Client-Lib
Public Types | Public Member Functions | Private Attributes | List of all members
boost_support::server::tls::TlsServer::TlsServerImpl Class Referencefinal
Collaboration diagram for boost_support::server::tls::TlsServer::TlsServerImpl:
Collaboration graph
[legend]

Public Types

using TlsSocket = socket::tls::TlsSocket
 Type alias for secured socket. More...
 
using TcpConnectionSecured = connection::tcp::TcpConnection< connection::tcp::ConnectionType::kServer, TlsSocket >
 Type alias for secured tcp connection. More...
 

Public Member Functions

 TlsServerImpl (std::string_view server_name, TlsSocket tcp_socket) noexcept
 Constructs an instance of TcpServerImpl. More...
 
 TlsServerImpl (const TlsServerImpl &other) noexcept=delete
 Deleted copy assignment and copy constructor. More...
 
TlsServerImploperator= (const TlsServerImpl &other) noexcept=delete
 
 TlsServerImpl (TlsServerImpl &&other) noexcept=delete
 Deleted move assignment and move constructor. More...
 
TlsServerImploperator= (TlsServerImpl &&other) noexcept=delete
 
 ~TlsServerImpl () noexcept=default
 Destruct an instance of TcpServerImpl. More...
 
void Initialize () noexcept
 Initialize the TcpServerImpl. More...
 
void DeInitialize () noexcept
 De-initialize the TcpServerImpl. More...
 
void SetReadHandler (HandlerRead read_handler) noexcept
 Function to set the read handler that is invoked when message is received. More...
 
core_type::Result< void > Transmit (MessageConstPtr tcp_message)
 Function to transmit the provided tcp message. More...
 

Private Attributes

TcpConnectionSecured tcp_connection_
 Store the tcp connection. More...
 

Detailed Description

Definition at line 18 of file tls_server.cpp.

Member Typedef Documentation

◆ TcpConnectionSecured

Type alias for secured tcp connection.

Definition at line 28 of file tls_server.cpp.

◆ TlsSocket

Type alias for secured socket.

Definition at line 23 of file tls_server.cpp.

Constructor & Destructor Documentation

◆ TlsServerImpl() [1/3]

boost_support::server::tls::TlsServer::TlsServerImpl::TlsServerImpl ( std::string_view  server_name,
TlsSocket  tcp_socket 
)
inlineexplicitnoexcept

Constructs an instance of TcpServerImpl.

Parameters
[in]tcp_socketThe underlying tcp socket required for communication

Definition at line 36 of file tls_server.cpp.

37  : tcp_connection_{server_name, std::move(tcp_socket)} {}
TcpConnectionSecured tcp_connection_
Store the tcp connection.
Definition: tls_server.cpp:90

◆ TlsServerImpl() [2/3]

boost_support::server::tls::TlsServer::TlsServerImpl::TlsServerImpl ( const TlsServerImpl other)
deletenoexcept

Deleted copy assignment and copy constructor.

◆ TlsServerImpl() [3/3]

boost_support::server::tls::TlsServer::TlsServerImpl::TlsServerImpl ( TlsServerImpl &&  other)
deletenoexcept

Deleted move assignment and move constructor.

◆ ~TlsServerImpl()

boost_support::server::tls::TlsServer::TlsServerImpl::~TlsServerImpl ( )
defaultnoexcept

Destruct an instance of TcpServerImpl.

Member Function Documentation

◆ DeInitialize()

void boost_support::server::tls::TlsServer::TlsServerImpl::DeInitialize ( )
inlinenoexcept

De-initialize the TcpServerImpl.

Definition at line 64 of file tls_server.cpp.

64 { tcp_connection_.DeInitialize(); }

References tcp_connection_.

◆ Initialize()

void boost_support::server::tls::TlsServer::TlsServerImpl::Initialize ( )
inlinenoexcept

Initialize the TcpServerImpl.

Definition at line 59 of file tls_server.cpp.

59 { tcp_connection_.Initialize(); }

References tcp_connection_.

◆ operator=() [1/2]

TlsServerImpl& boost_support::server::tls::TlsServer::TlsServerImpl::operator= ( const TlsServerImpl other)
deletenoexcept

◆ operator=() [2/2]

TlsServerImpl& boost_support::server::tls::TlsServer::TlsServerImpl::operator= ( TlsServerImpl &&  other)
deletenoexcept

◆ SetReadHandler()

void boost_support::server::tls::TlsServer::TlsServerImpl::SetReadHandler ( HandlerRead  read_handler)
inlinenoexcept

Function to set the read handler that is invoked when message is received.

The ownership of provided read handler is moved

Parameters
[in]read_handlerThe handler to be set

Definition at line 72 of file tls_server.cpp.

72  {
73  tcp_connection_.SetReadHandler(std::move(read_handler));
74  }

References tcp_connection_.

◆ Transmit()

core_type::Result<void> boost_support::server::tls::TlsServer::TlsServerImpl::Transmit ( MessageConstPtr  tcp_message)
inline

Function to transmit the provided tcp message.

Parameters
[in]tcp_messageThe tcp message
Returns
Empty void on success, otherwise error is returned

Definition at line 82 of file tls_server.cpp.

82  {
83  return tcp_connection_.Transmit(std::move(tcp_message));
84  }

References tcp_connection_.

Member Data Documentation

◆ tcp_connection_

TcpConnectionSecured boost_support::server::tls::TlsServer::TlsServerImpl::tcp_connection_
private

Store the tcp connection.

Definition at line 90 of file tls_server.cpp.

Referenced by DeInitialize(), Initialize(), SetReadHandler(), and Transmit().


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