Diag-Client-Lib
|
Immutable class to store received udp message. More...
#include <udp_message.h>
Public Types | |
using | BufferType = std::vector< uint8_t > |
Type alias for underlying buffer. More... | |
using | IpAddressType = std::string_view |
Type alias of IP address type. More... | |
Public Member Functions | |
UdpMessage (IpAddressType host_ip_address, std::uint16_t host_port_number) | |
Default constructor of UdpMessage. More... | |
UdpMessage (IpAddressType host_ip_address, std::uint16_t host_port_number, BufferType payload) | |
Constructs an instance of UdpMessage. More... | |
UdpMessage (UdpMessage &&other) noexcept=default | |
UdpMessage & | operator= (UdpMessage &&other) noexcept=default |
UdpMessage (const UdpMessage &other)=delete | |
UdpMessage & | operator= (const UdpMessage &other)=delete |
virtual | ~UdpMessage ()=default |
Destructs an instance of UdpMessage. More... | |
IpAddressType | GetHostIpAddress () const |
Get the host ip address. More... | |
std::uint16_t | GetHostPortNumber () const |
Get the host port number. More... | |
core_type::Span< std::uint8_t > | GetRxBuffer () |
Get the view to the rx buffer. More... | |
BufferType & | GetTxBuffer () |
Get the reference to tx buffer. More... | |
BufferType const & | GetTxBuffer () const |
Get the reference to tx buffer. More... | |
Private Attributes | |
BufferType | rx_buffer_ |
The reception buffer. More... | |
BufferType | tx_buffer_ |
The transmission buffer. More... | |
IpAddressType | host_ip_address_ |
Store remote ip address. More... | |
std::uint16_t | host_port_number_ |
Store remote port number. More... | |
Immutable class to store received udp message.
Definition at line 31 of file udp_message.h.
using boost_support::socket::udp::UdpMessage::BufferType = std::vector<uint8_t> |
Type alias for underlying buffer.
Definition at line 36 of file udp_message.h.
using boost_support::socket::udp::UdpMessage::IpAddressType = std::string_view |
Type alias of IP address type.
Definition at line 41 of file udp_message.h.
|
inline |
Default constructor of UdpMessage.
Definition at line 47 of file udp_message.h.
|
inline |
Constructs an instance of UdpMessage.
[in] | host_ip_address | The host ip address |
[in] | host_port_number | The host port number |
[in] | payload | The received data payload |
Definition at line 62 of file udp_message.h.
|
defaultnoexcept |
|
delete |
|
virtualdefault |
Destructs an instance of UdpMessage.
|
inline |
Get the host ip address.
Definition at line 83 of file udp_message.h.
References host_ip_address_.
|
inline |
Get the host port number.
Definition at line 89 of file udp_message.h.
References host_port_number_.
|
inline |
Get the view to the rx buffer.
Definition at line 95 of file udp_message.h.
References rx_buffer_.
|
inline |
Get the reference to tx buffer.
Definition at line 101 of file udp_message.h.
References tx_buffer_.
|
inline |
Get the reference to tx buffer.
Definition at line 107 of file udp_message.h.
References tx_buffer_.
|
delete |
|
defaultnoexcept |
|
private |
Store remote ip address.
Definition at line 123 of file udp_message.h.
Referenced by GetHostIpAddress().
|
private |
Store remote port number.
Definition at line 128 of file udp_message.h.
Referenced by GetHostPortNumber().
|
private |
|
private |