Condy v1.1.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
helpers.hpp File Reference

Helper functions for asynchronous operations. More...

#include "condy/concepts.hpp"
#include "condy/condy_uring.hpp"
#include "condy/provided_buffers.hpp"
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  condy
 The main namespace for the Condy library.

Macros

#define CONDY_FILE_INDEX_ALLOC   IORING_FILE_INDEX_ALLOC
 Placeholder to let io_uring allocate a direct file descriptor.

Functions

template<typename CoroFunc>
auto condy::will_spawn (CoroFunc &&coro)
 Helper to build an invocable that spawns a coroutine on invocation.
template<typename Channel>
auto condy::will_push (Channel &channel)
 Helper to build an invocable that pushes the result to a channel on invocation.
auto condy::fixed (int fd)
 Mark a file descriptor as fixed for io_uring operations.
template<BufferLike Buffer>
auto condy::fixed (int buf_index, Buffer &&buf)
 Mark a buffer as fixed for io_uring operations.
auto condy::fixed (int buf_index, const struct iovec *iov)
 Mark iovecs as fixed for io_uring operations.
auto condy::fixed (int buf_index, const struct msghdr *msg)
 Mark msghdr as fixed for io_uring operations.
auto & condy::bundled (ProvidedBufferPool &buffer)
 Get the bundled variant of a provided buffer pool. This will enable buffer bundling feature of io_uring.
auto & condy::bundled (ProvidedBufferQueue &buffer)
 Get the bundled variant of a provided buffer queue. This will enable buffer bundling feature of io_uring.

Detailed Description

Helper functions for asynchronous operations.

This file defines a set of helper functions primarily used in conjunction with asynchronous operations to enhance their expressiveness and usability.