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 supportenum SpliceResult
struct AsyncSplice
Types 2
enumSpliceResult
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.
structAsyncSplice
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