CatapultServer  v0.5.0.1 (Elephant)
catapult::ionet::WorkingBuffer Class Reference

A buffer for storing working data. More...

Collaboration diagram for catapult::ionet::WorkingBuffer:

Public Member Functions

 WorkingBuffer (const PacketSocketOptions &options)
 Creates an empty working buffer around options. More...
 
auto begin () const
 Returns a const iterator to the beginning of the buffer. More...
 
auto end () const
 Returns a const iterator to the end of the buffer. More...
 
auto size () const
 Returns the size of the buffer. More...
 
auto data () const
 Returns a const pointer to the raw buffer. More...
 
auto capacity () const
 Returns the capacity of the raw buffer. More...
 
AppendContext prepareAppend ()
 Creates an append context that can be used to append data to the working buffer. More...
 
PacketExtractor preparePacketExtractor ()
 Creates a packet extractor that can be used to extract packets from the working buffer. More...
 

Private Member Functions

void checkMemoryUsage ()
 

Private Attributes

PacketSocketOptions m_options
 
ByteBuffer m_data
 
size_t m_numDataSizeSamples
 
size_t m_maxDataSize
 

Detailed Description

A buffer for storing working data.

Constructor & Destructor Documentation

◆ WorkingBuffer()

catapult::ionet::WorkingBuffer::WorkingBuffer ( const PacketSocketOptions options)
explicit

Creates an empty working buffer around options.

Member Function Documentation

◆ begin()

auto catapult::ionet::WorkingBuffer::begin ( ) const
inline

Returns a const iterator to the beginning of the buffer.

◆ capacity()

auto catapult::ionet::WorkingBuffer::capacity ( ) const
inline

Returns the capacity of the raw buffer.

◆ checkMemoryUsage()

void catapult::ionet::WorkingBuffer::checkMemoryUsage ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

auto catapult::ionet::WorkingBuffer::data ( ) const
inline

Returns a const pointer to the raw buffer.

◆ end()

auto catapult::ionet::WorkingBuffer::end ( ) const
inline

Returns a const iterator to the end of the buffer.

◆ prepareAppend()

AppendContext catapult::ionet::WorkingBuffer::prepareAppend ( )

Creates an append context that can be used to append data to the working buffer.

Here is the call graph for this function:

◆ preparePacketExtractor()

PacketExtractor catapult::ionet::WorkingBuffer::preparePacketExtractor ( )

Creates a packet extractor that can be used to extract packets from the working buffer.

◆ size()

auto catapult::ionet::WorkingBuffer::size ( ) const
inline

Returns the size of the buffer.

Member Data Documentation

◆ m_data

ByteBuffer catapult::ionet::WorkingBuffer::m_data
private

◆ m_maxDataSize

size_t catapult::ionet::WorkingBuffer::m_maxDataSize
private

◆ m_numDataSizeSamples

size_t catapult::ionet::WorkingBuffer::m_numDataSizeSamples
private

◆ m_options

PacketSocketOptions catapult::ionet::WorkingBuffer::m_options
private

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