Kea 2.5.7
isc::tcp::TcpRequest Class Referenceabstract

Abstract class used to receive an inbound message. More...

#include <tcp_connection.h>

+ Inheritance diagram for isc::tcp::TcpRequest:

Public Member Functions

virtual ~TcpRequest ()
 Destructor.
 
virtual std::string logFormatRequest (const size_t limit=0) const =0
 Returns request contents formatted for log output.
 
virtual bool needData () const =0
 Returns true if the request is incomplete.
 
virtual size_t postBuffer (const void *buf, const size_t nbytes)=0
 Adds data to an incomplete request.
 
virtual void unpack ()=0
 Unpacks wire data once the message has been completely received.
 
- Public Member Functions inherited from isc::tcp::TcpMessage
virtual ~TcpMessage ()
 Destructor.
 
const uint8_t * getWireData () const
 Returns pointer to the first byte of the wire data.
 
size_t getWireDataSize () const
 Returns current size of the wire data.
 

Additional Inherited Members

- Protected Attributes inherited from isc::tcp::TcpMessage
WireData wire_data_
 Buffer used for data in wire format data.
 

Detailed Description

Abstract class used to receive an inbound message.

Definition at line 62 of file tcp_connection.h.

Constructor & Destructor Documentation

◆ ~TcpRequest()

virtual isc::tcp::TcpRequest::~TcpRequest ( )
inlinevirtual

Destructor.

Definition at line 65 of file tcp_connection.h.

Member Function Documentation

◆ logFormatRequest()

virtual std::string isc::tcp::TcpRequest::logFormatRequest ( const size_t  limit = 0) const
pure virtual

Returns request contents formatted for log output.

Parameters
limitMaximum length of the buffer to be output. If the limit is 0, the length of the output is unlimited.
Returns
Textual representation of the input buffer.

Implemented in isc::tcp::TcpStreamRequest.

◆ needData()

virtual bool isc::tcp::TcpRequest::needData ( ) const
pure virtual

Returns true if the request is incomplete.

Returns
true if the request is incomplete.

Implemented in isc::tcp::TcpStreamRequest.

◆ postBuffer()

virtual size_t isc::tcp::TcpRequest::postBuffer ( const void *  buf,
const size_t  nbytes 
)
pure virtual

Adds data to an incomplete request.

Parameters
bufA pointer to the buffer holding the data.
nbytesSize of the data within the buffer.
Returns
number of bytes posted (consumed)

Implemented in isc::tcp::TcpStreamRequest.

◆ unpack()

virtual void isc::tcp::TcpRequest::unpack ( )
pure virtual

Unpacks wire data once the message has been completely received.

Implemented in isc::tcp::TcpStreamRequest.


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