Condy v1.1.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
condy::ProvidedBufferPool Class Reference

Provided buffer pool. More...

#include <provided_buffers.hpp>

Public Member Functions

 ProvidedBufferPool (uint32_t num_buffers, size_t buffer_size, unsigned int flags=0)
 Construct a new ProvidedBufferPool object.
size_t capacity () const
 Get the capacity of the buffer pool.
size_t buffer_size () const
 Get the size of each buffer in the pool.

Detailed Description

Provided buffer pool.

A provided buffer pool manages a pool of buffers that can be used in asynchronous operations. Only receiving operations can obtain buffers from the pool.

Returns
std::pair<int, ProvidedBuffer> When pass to async operations, the return type will be a pair of the operation result and the ProvidedBuffer.

Constructor & Destructor Documentation

◆ ProvidedBufferPool()

condy::ProvidedBufferPool::ProvidedBufferPool ( uint32_t num_buffers,
size_t buffer_size,
unsigned int flags = 0 )
inline

Construct a new ProvidedBufferPool object.

Parameters
num_buffersNumber of buffers to allocate in the pool.
buffer_sizeSize of each buffer in bytes.
flagsOptional flags for io_uring buffer registration (default: 0).

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