|
Diag-Client-Lib
|
Client that manages udp connection. More...
#include <udp_client.h>
Classes | |
| class | UdpClientImpl |
| Class to provide implementation of udp client. More... | |
Public Types | |
| using | Message = boost_support::message::udp::UdpMessage |
| Type alias for Tcp message. More... | |
| using | MessagePtr = boost_support::message::udp::UdpMessagePtr |
| Type alias for Tcp message pointer. More... | |
| using | MessageConstPtr = boost_support::message::udp::UdpMessageConstPtr |
| Type alias for Tcp message const pointer. More... | |
| using | HandlerRead = std::function< void(MessagePtr)> |
| Tcp function template used for reception. More... | |
Public Member Functions | |
| UdpClient (std::string_view local_ip_address, std::uint16_t local_port_num) noexcept | |
| Constructs an instance of UdpClient. More... | |
| UdpClient (const UdpClient &other) noexcept=delete | |
| Deleted copy assignment and copy constructor. More... | |
| UdpClient & | operator= (const UdpClient &other) noexcept=delete |
| UdpClient (UdpClient &&other) noexcept | |
| Move assignment and move constructor. More... | |
| UdpClient & | operator= (UdpClient &&other) noexcept |
| ~UdpClient () noexcept | |
| Destruct an instance of UdpClient. 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 tcp message. More... | |
Private Attributes | |
| std::unique_ptr< UdpClientImpl > | udp_client_impl_ |
| Unique pointer to udp client implementation. More... | |
Client that manages udp connection.
Definition at line 24 of file udp_client.h.
| using boost_support::client::udp::UdpClient::HandlerRead = std::function<void(MessagePtr)> |
Tcp function template used for reception.
Definition at line 44 of file udp_client.h.
Type alias for Tcp message.
Definition at line 29 of file udp_client.h.
| using boost_support::client::udp::UdpClient::MessageConstPtr = boost_support::message::udp::UdpMessageConstPtr |
Type alias for Tcp message const pointer.
Definition at line 39 of file udp_client.h.
| using boost_support::client::udp::UdpClient::MessagePtr = boost_support::message::udp::UdpMessagePtr |
Type alias for Tcp message pointer.
Definition at line 34 of file udp_client.h.
|
noexcept |
Constructs an instance of UdpClient.
| [in] | local_ip_address | The local ip address |
| [in] | local_port_num | The local port number |
Definition at line 111 of file udp_client.cpp.
|
deletenoexcept |
Deleted copy assignment and copy constructor.
|
defaultnoexcept |
Move assignment and move constructor.
|
defaultnoexcept |
Destruct an instance of UdpClient.
|
noexcept |
De-initialize the client.
Definition at line 122 of file udp_client.cpp.
References udp_client_impl_.
|
noexcept |
Initialize the client.
Definition at line 120 of file udp_client.cpp.
References Initialize().
Referenced by Initialize().


|
deletenoexcept |
|
noexcept |
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 124 of file udp_client.cpp.
| core_type::Result< void > boost_support::client::udp::UdpClient::Transmit | ( | UdpClient::MessageConstPtr | udp_message | ) |
Function to transmit the provided tcp message.
| [in] | udp_message | The udp message |
Definition at line 128 of file udp_client.cpp.
References udp_client_impl_.
|
private |
Unique pointer to udp client implementation.
Definition at line 108 of file udp_client.h.
Referenced by DeInitialize(), and Transmit().