|
Diag-Client-Lib
|
Class to provide implementation of udp client. More...

Public Member Functions | |
| UdpClientImpl (std::string_view local_ip_address, std::uint16_t local_port_num) noexcept | |
| Constructs an instance of UdpClientImpl. More... | |
| UdpClientImpl (const UdpClientImpl &other) noexcept=delete | |
| Deleted copy assignment and copy constructor. More... | |
| UdpClientImpl & | operator= (const UdpClientImpl &other) noexcept=delete |
| UdpClientImpl (UdpClientImpl &&other) noexcept=delete | |
| Deleted move assignment and move constructor. More... | |
| UdpClientImpl & | operator= (UdpClientImpl &&other) noexcept=delete |
| ~UdpClientImpl () noexcept=default | |
| Destruct an instance of UdpClientImpl. More... | |
| void | Initialize () noexcept |
| Initialize the client. More... | |
| void | DeInitialize () noexcept |
| De-initialize the client. 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 udp_message) |
| Function to transmit the provided udp message. More... | |
Private Types | |
| using | UdpConnection = connection::udp::UdpConnection< socket::udp::UdpSocket > |
| Type alias for Udp connection. More... | |
| using | IoContext = boost_support::socket::IoContext |
| Type alias for boost context. More... | |
Private Attributes | |
| IoContext | io_context_ |
| Stores the io context. More... | |
| UdpConnection | udp_connection_ |
| Store the udp connection. More... | |
Class to provide implementation of udp client.
Definition at line 22 of file udp_client.cpp.
|
private |
Type alias for boost context.
Definition at line 98 of file udp_client.cpp.
|
private |
Type alias for Udp connection.
Definition at line 93 of file udp_client.cpp.
|
inlinenoexcept |
Constructs an instance of UdpClientImpl.
| [in] | local_ip_address | The local ip address of client |
| [in] | local_port_num | The local port number of client |
Definition at line 31 of file udp_client.cpp.
|
deletenoexcept |
Deleted copy assignment and copy constructor.
|
deletenoexcept |
Deleted move assignment and move constructor.
|
defaultnoexcept |
Destruct an instance of UdpClientImpl.
|
inlinenoexcept |
De-initialize the client.
Definition at line 64 of file udp_client.cpp.
References boost_support::connection::udp::UdpConnection< Socket >::DeInitialize(), boost_support::socket::IoContext::DeInitialize(), io_context_, and udp_connection_.

|
inlinenoexcept |
Initialize the client.
Definition at line 56 of file udp_client.cpp.
References boost_support::connection::udp::UdpConnection< Socket >::Initialize(), boost_support::socket::IoContext::Initialize(), io_context_, and udp_connection_.

|
deletenoexcept |
|
deletenoexcept |
|
inlinenoexcept |
Function to set the read handler that is invoked when message is received.
The ownership of provided read handler is moved
| [in] | read_handler | The handler to be set |
Definition at line 75 of file udp_client.cpp.
References boost_support::connection::udp::UdpConnection< Socket >::SetReadHandler(), and udp_connection_.

|
inline |
Function to transmit the provided udp message.
| [in] | udp_message | The udp message |
Definition at line 85 of file udp_client.cpp.
References boost_support::connection::udp::UdpConnection< Socket >::Transmit(), and udp_connection_.

|
private |
Stores the io context.
Definition at line 103 of file udp_client.cpp.
Referenced by DeInitialize(), and Initialize().
|
private |
Store the udp connection.
Definition at line 108 of file udp_client.cpp.
Referenced by DeInitialize(), Initialize(), SetReadHandler(), and Transmit().