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

Buffer table for io_uring. More...

#include <ring.hpp>

Public Member Functions

int init (size_t capacity)
 Initialize the buffer table with the given capacity.
int destroy ()
 Destroy the buffer table.
int update (unsigned index_base, const iovec *vecs, unsigned nr_vecs)
 Update the buffer table starting from the given index.
int clone_buffers (BufferTable &src, unsigned int dst_off=0, unsigned int src_off=0, unsigned int nr=0)
 Clone buffers from another BufferTable into this one.

Detailed Description

Buffer table for io_uring.

This class makes an abstraction over the io_uring buffer registration interface.

Member Function Documentation

◆ clone_buffers()

int condy::BufferTable::clone_buffers ( BufferTable & src,
unsigned int dst_off = 0,
unsigned int src_off = 0,
unsigned int nr = 0 )
inline

Clone buffers from another BufferTable into this one.

Parameters
srcThe source BufferTable to clone from
dst_offThe starting offset in the destination buffer table
src_offThe starting offset in the source buffer table
nrThe number of buffers to clone
Returns
int Returns 0 on success or a negative error code on failure

◆ destroy()

int condy::BufferTable::destroy ( )
inline

Destroy the buffer table.

Returns
int Returns 0 on success or a negative error code on failure

◆ init()

int condy::BufferTable::init ( size_t capacity)
inline

Initialize the buffer table with the given capacity.

Parameters
capacityThe number of buffers to allocate in the table
Returns
int Returns 0 on success or a negative error code on failure

◆ update()

int condy::BufferTable::update ( unsigned index_base,
const iovec * vecs,
unsigned nr_vecs )
inline

Update the buffer table starting from the given index.

Parameters
index_baseThe starting index to update
vecsPointer to the array of iovec structures representing buffers
nr_vecsNumber of buffers to update
Returns
int Returns 0 on success or a negative error code on failure

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