|
Diag-Client-Lib
|
Public Types | |
| using | TcpSocket = socket::tcp::TcpSocket |
| Type alias for tcp unsecured socket. More... | |
Public Member Functions | |
| TcpAcceptorImpl (std::string_view acceptor_name, std::string_view local_ip_address, std::uint16_t local_port_num, std::uint8_t maximum_connection) noexcept | |
| Constructs an instance of Acceptor. More... | |
| std::optional< TcpServer > | GetTcpServer () noexcept |
| Get a tcp server ready to communicate. More... | |
Private Types | |
| using | Acceptor = boost::asio::ip::tcp::acceptor |
| Type alias for tcp acceptor. More... | |
Private Attributes | |
| boost::asio::io_context | io_context_ |
| Store the io context. More... | |
| std::uint16_t | server_count_ |
| Keeps the count of server created. More... | |
| std::string | acceptor_name_ |
| Store the name of the acceptor. More... | |
| Acceptor | acceptor_ |
| Store the tcp acceptor. More... | |
Definition at line 41 of file tcp_acceptor.cpp.
|
private |
Type alias for tcp acceptor.
Definition at line 106 of file tcp_acceptor.cpp.
Type alias for tcp unsecured socket.
Definition at line 46 of file tcp_acceptor.cpp.
|
inlinenoexcept |
Constructs an instance of Acceptor.
Tcp connection shall be accepted on this ip address and port
| [in] | local_ip_address | The local ip address |
| [in] | local_port_num | The local port number |
| [in] | maximum_connection | The maximum number of accepted connection |
Definition at line 59 of file tcp_acceptor.cpp.
|
inlinenoexcept |
Get a tcp server ready to communicate.
This blocks until new server is created
Definition at line 75 of file tcp_acceptor.cpp.
References acceptor_, acceptor_name_, boost_support::server::tcp::anonymous_namespace{tcp_acceptor.cpp}::CreateServerName(), FILE_NAME, boost_support::common::logger::LibBoostLogger::GetLibBoostLogger(), and server_count_.

|
private |
Store the tcp acceptor.
Definition at line 126 of file tcp_acceptor.cpp.
Referenced by GetTcpServer().
|
private |
Store the name of the acceptor.
Definition at line 121 of file tcp_acceptor.cpp.
Referenced by GetTcpServer().
|
private |
Store the io context.
Definition at line 111 of file tcp_acceptor.cpp.
|
private |
Keeps the count of server created.
Definition at line 116 of file tcp_acceptor.cpp.
Referenced by GetTcpServer().