MySQL 8.4.2
Source Code Documentation
net::consuming_buffers< BufferSequence, BufferType > Class Template Reference

#include <buffer.h>

Public Types

using prepared_buffer_type = prepared_buffers< BufferType >
 

Public Member Functions

 consuming_buffers (const BufferSequence &buffers)
 
prepared_buffer_type prepare (size_t max_size)
 prepare a buffer sequence, skipping the already consumed bytes. More...
 
void consume (size_t n)
 mark bytes as consumed from the beginning of the unconsumed sequence. More...
 
size_t total_consumed () const
 

Private Attributes

const BufferSequence & buffers_
 
size_t total_consumed_ {0}
 

Member Typedef Documentation

◆ prepared_buffer_type

template<class BufferSequence , class BufferType >
using net::consuming_buffers< BufferSequence, BufferType >::prepared_buffer_type = prepared_buffers<BufferType>

Constructor & Destructor Documentation

◆ consuming_buffers()

template<class BufferSequence , class BufferType >
net::consuming_buffers< BufferSequence, BufferType >::consuming_buffers ( const BufferSequence &  buffers)
inline

Member Function Documentation

◆ consume()

template<class BufferSequence , class BufferType >
void net::consuming_buffers< BufferSequence, BufferType >::consume ( size_t  n)
inline

mark bytes as consumed from the beginning of the unconsumed sequence.

Parameters
nbytes to consume

note: n may be larger than the size of the buffer-sequence

◆ prepare()

template<class BufferSequence , class BufferType >
prepared_buffer_type net::consuming_buffers< BufferSequence, BufferType >::prepare ( size_t  max_size)
inline

prepare a buffer sequence, skipping the already consumed bytes.

Parameters
max_sizemax bytes to take from the buffer sequence

note: nax_size may be larger than the size of the buffer-sequence

◆ total_consumed()

template<class BufferSequence , class BufferType >
size_t net::consuming_buffers< BufferSequence, BufferType >::total_consumed ( ) const
inline

Member Data Documentation

◆ buffers_

template<class BufferSequence , class BufferType >
const BufferSequence& net::consuming_buffers< BufferSequence, BufferType >::buffers_
private

◆ total_consumed_

template<class BufferSequence , class BufferType >
size_t net::consuming_buffers< BufferSequence, BufferType >::total_consumed_ {0}
private

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