Diag-Client-Lib
Classes | Public Member Functions | Private Attributes | List of all members
boost_support::server::tls::TlsAcceptor< TlsVersion > Class Template Reference

The acceptor to create new tcp servers. More...

#include <tls_acceptor.h>

Classes

class  TlsAcceptorImpl
 

Public Member Functions

 TlsAcceptor (std::string_view acceptor_name, std::string_view local_ip_address, std::uint16_t local_port_num, std::uint8_t maximum_connection, TlsVersion tls_version, std::string_view certificate_path, std::string_view private_key_path) noexcept
 Constructs an instance of Acceptor. More...
 
 ~TlsAcceptor () noexcept
 Destruct an instance of TlsAcceptor. More...
 
std::optional< TlsServerGetTlsServer () noexcept
 Get a tls server ready to communicate. More...
 

Private Attributes

std::unique_ptr< TlsAcceptorImpltls_acceptor_impl_
 Unique pointer to tls acceptor implementation. More...
 

Detailed Description

template<typename TlsVersion>
class boost_support::server::tls::TlsAcceptor< TlsVersion >

The acceptor to create new tcp servers.

Template Parameters
TlsVersionThe tls version to be used by client for communication

Definition at line 38 of file tls_acceptor.h.

Constructor & Destructor Documentation

◆ TlsAcceptor()

template<typename TlsVersion >
boost_support::server::tls::TlsAcceptor< TlsVersion >::TlsAcceptor ( std::string_view  acceptor_name,
std::string_view  local_ip_address,
std::uint16_t  local_port_num,
std::uint8_t  maximum_connection,
TlsVersion  tls_version,
std::string_view  certificate_path,
std::string_view  private_key_path 
)
noexcept

Constructs an instance of Acceptor.

Tcp connection shall be accepted on this ip address and port

Parameters
[in]local_ip_addressThe local ip address
[in]local_port_numThe local port number
[in]maximum_connectionThe maximum number of accepted connection allowed

Definition at line 146 of file tls_acceptor.cpp.

151  : tls_acceptor_impl_{std::make_unique<TlsAcceptorImpl>(
152  acceptor_name, local_ip_address, local_port_num, maximum_connection,
153  std::move(tls_version), certificate_path, private_key_path)} {}
std::unique_ptr< TlsAcceptorImpl > tls_acceptor_impl_
Unique pointer to tls acceptor implementation.
Definition: tls_acceptor.h:70

◆ ~TlsAcceptor()

template<typename TlsVersion >
boost_support::server::tls::TlsAcceptor< TlsVersion >::~TlsAcceptor ( )
defaultnoexcept

Destruct an instance of TlsAcceptor.

Member Function Documentation

◆ GetTlsServer()

template<typename TlsVersion >
std::optional< TlsServer > boost_support::server::tls::TlsAcceptor< TlsVersion >::GetTlsServer
noexcept

Get a tls server ready to communicate.

This blocks until new server is created

Returns
Tls server object on success, else nothing

Definition at line 159 of file tls_acceptor.cpp.

159  {
160  return tls_acceptor_impl_->GetTlsServer();
161 }

References boost_support::server::tls::TlsAcceptor< TlsVersion >::GetTlsServer().

Referenced by boost_support::server::tls::TlsAcceptor< TlsVersion >::GetTlsServer().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ tls_acceptor_impl_

template<typename TlsVersion >
std::unique_ptr<TlsAcceptorImpl> boost_support::server::tls::TlsAcceptor< TlsVersion >::tls_acceptor_impl_
private

Unique pointer to tls acceptor implementation.

Definition at line 75 of file tls_acceptor.h.


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