Kea 3.3.3
isc::tcp::TcpMessage Class Referenceabstract

Base class for TCP messages. More...

#include <tcp_connection.h>

Inheritance diagram for isc::tcp::TcpMessage:

Public Member Functions

virtual ~TcpMessage ()=default
 Destructor.
virtual const uint8_t * getWireData () const =0
 Returns pointer to the first byte of the wire data.
virtual size_t getWireDataSize () const =0
 Returns current size of the wire data.

Protected Member Functions

const uint8_t * getWireData (size_t position) const
 Returns pointer to current byte of the wire data.
size_t getWireDataSize (size_t position) const
 Returns current size of the wire data.

Protected Attributes

size_t position_
 Position in the data.
WireData wire_data_
 Buffer used for data in wire format data.

Detailed Description

Base class for TCP messages.

Definition at line 31 of file tcp_connection.h.

Constructor & Destructor Documentation

◆ ~TcpMessage()

virtual isc::tcp::TcpMessage::~TcpMessage ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getWireData() [1/2]

virtual const uint8_t * isc::tcp::TcpMessage::getWireData ( ) const
pure virtual

Returns pointer to the first byte of the wire data.

Implemented in isc::tcp::TcpRequest, and isc::tcp::TcpResponse.

Referenced by isc::tcp::TcpRequest::getWireData(), and isc::tcp::TcpResponse::getWireData().

◆ getWireData() [2/2]

const uint8_t * isc::tcp::TcpMessage::getWireData ( size_t position) const
inlineprotected

Returns pointer to current byte of the wire data.

Parameters
positionPosition inside the data.
Exceptions
InvalidOperationif position is out of bounds.
Returns
Constant raw pointer to the data.

Definition at line 48 of file tcp_connection.h.

References isc_throw, and wire_data_.

◆ getWireDataSize() [1/2]

virtual size_t isc::tcp::TcpMessage::getWireDataSize ( ) const
pure virtual

Returns current size of the wire data.

Implemented in isc::tcp::TcpRequest, and isc::tcp::TcpResponse.

Referenced by isc::tcp::TcpRequest::getWireDataSize(), and isc::tcp::TcpResponse::getWireDataSize().

◆ getWireDataSize() [2/2]

size_t isc::tcp::TcpMessage::getWireDataSize ( size_t position) const
inlineprotected

Returns current size of the wire data.

Parameters
positionPosition inside the data.
Exceptions
InvalidOperationif position is out of bounds.
Returns
Remaining data size.

Definition at line 62 of file tcp_connection.h.

References isc_throw, and wire_data_.

Member Data Documentation

◆ position_

size_t isc::tcp::TcpMessage::position_
protected

Position in the data.

Definition at line 74 of file tcp_connection.h.

◆ wire_data_


The documentation for this class was generated from the following file: