8 #ifndef DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_SOCKET_UDP_UDP_MESSAGE_H_
9 #define DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_SOCKET_UDP_UDP_MESSAGE_H_
13 #include <string_view>
Immutable class to store received udp message.
std::vector< uint8_t > BufferType
Type alias for underlying buffer.
BufferType tx_buffer_
The transmission buffer.
BufferType rx_buffer_
The reception buffer.
std::uint16_t host_port_number_
Store remote port number.
std::uint16_t GetHostPortNumber() const
Get the host port number.
IpAddressType GetHostIpAddress() const
Get the host ip address.
UdpMessage & operator=(const UdpMessage &other)=delete
IpAddressType host_ip_address_
Store remote ip address.
UdpMessage(IpAddressType host_ip_address, std::uint16_t host_port_number, BufferType payload)
Constructs an instance of UdpMessage.
UdpMessage(const UdpMessage &other)=delete
core_type::Span< std::uint8_t > GetRxBuffer()
Get the view to the rx buffer.
std::string_view IpAddressType
Type alias of IP address type.
virtual ~UdpMessage()=default
Destructs an instance of UdpMessage.
BufferType & GetTxBuffer()
Get the reference to tx buffer.
UdpMessage(UdpMessage &&other) noexcept=default
UdpMessage & operator=(UdpMessage &&other) noexcept=default
BufferType const & GetTxBuffer() const
Get the reference to tx buffer.
UdpMessage(IpAddressType host_ip_address, std::uint16_t host_port_number)
Default constructor of UdpMessage.
std::unique_ptr< const UdpMessage > UdpMessageConstPtr
The unique pointer to const UdpMessage.
constexpr std::uint8_t kDoipUdpResSize
Doip maximum response size.
std::unique_ptr< UdpMessage > UdpMessagePtr
The unique pointer to UdpMessage.