8 #ifndef DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_SOCKET_TCP_TCP_MESSAGE_H_ 
    9 #define DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_SOCKET_TCP_TCP_MESSAGE_H_ 
   14 #include <string_view> 
Immutable class to store received tcp message.
 
IpAddressType GetHostIpAddress() const
Get the host ip address.
 
SocketState
Definition of different socket state.
 
@ kSocketRxMessageReceived
 
BufferType payload_
The reception buffer.
 
SocketState socket_state_
Store the socket state.
 
std::uint16_t GetHostPortNumber() const
Get the host port number.
 
std::vector< std::uint8_t > BufferType
Type alias for underlying buffer.
 
std::uint16_t host_port_number_
Store remote port number.
 
TcpMessage(const TcpMessage &other)=default
 
TcpMessage(IpAddressType host_ip_address, std::uint16_t host_port_number, BufferType payload)
Constructs an instance of TcpMessage.
 
SocketError GetSocketError() const
Get the error of underlying socket.
 
TcpMessage & operator=(const TcpMessage &other)=default
 
~TcpMessage()=default
Destructs an instance of TcpMessage.
 
SocketError socket_error_
Store the socket error.
 
core_type::Span< std::uint8_t const  > GetPayload() const
Get the readable view on received payload.
 
SocketState GetSocketState() const
Get the state of underlying socket.
 
SocketError
Definition of different socket error that could occur.
 
std::string host_ip_address_
Store remote ip address.
 
std::string_view IpAddressType
Type alias of IP address type.
 
TcpMessage & operator=(TcpMessage &&other) noexcept=default
 
TcpMessage(TcpMessage &&other) noexcept=default
 
A view over a contiguous sequence of objects.
 
std::unique_ptr< TcpMessage > TcpMessagePtr
The unique pointer to TcpMessage.
 
std::unique_ptr< TcpMessage const  > TcpMessageConstPtr
The unique pointer to const TcpMessage.
 
constexpr std::uint8_t kDoipheadrSize
Doip HeaderSize.