eve.aio.splice

Async splice / zero-copy data transfer.

Provides async splice support on Linux using io_uring IORING_OP_SPLICE when available, falling back to the splice() syscall otherwise. On non-Linux platforms, always reports SpliceResult.NOT_SUPPORTED.

At least one of the file descriptors must refer to a pipe.

Example (Linux):

import eve.aio.splice;

const available = AsyncSplice.ioUringSpliceAvailable();
// Use splice() via thread pool or io_uring depending on kernel support

Types 2

Result of an async splice operation.

OK = 0Operation succeeded.
WOULD_BLOCK = 1Operation would block (non-blocking mode, no data available).
INVALID_FD = 2Invalid file descriptors (neither is a pipe).
IO_ERROR = 3I/O error during splice.
CANCELLED = 4Operation was cancelled.
NOT_SUPPORTED = 5Splice not supported on this platform.

Async splice helper for zero-copy data transfer.

On Linux, queries the kernel for IORING_OP_SPLICE support at runtime. When available, splice operations can be submitted through io_uring for fully asynchronous execution. Otherwise, the splice() syscall runs in a worker thread.

On non-Linux platforms, all operations return SpliceResult.NOT_SUPPORTED.

Methods
AsyncSplice create() static pure @safe nothrow @nogcCreate an async splice handle.
void dispose() @safe nothrow @nogcDispose the splice handle.
bool isOpen() @property const pure @safe nothrow @nogcWhether this handle is open for operations.