Functions
fn readAll(s: Stream, buffer: []u8) ReadError!usize
Returns the number of bytes read. If the number read is smaller than `buffer.le…
Returns the number of bytes read. If the number read is smaller than
buffer.len
, it means the stream reached the end. Reaching the end of a stream is not an error condition.fn readAtLeast(s: Stream, buffer: []u8, len: usize) ReadError!usize
Returns the number of bytes read, calling the underlying read function the mini…
Returns the number of bytes read, calling the underlying read function the minimal number of times until the buffer has at least
len
bytes filled. If the number read is less thanlen
it means the stream reached the end. Reaching the end of the stream is not an error condition.fn write(self: Stream, buffer: []const u8) WriteError!usize
TODO in evented I/O mode, this implementation incorrectly uses the event loop’s …
TODO in evented I/O mode, this implementation incorrectly uses the event loop’s file system thread instead of non-blocking. It needs to be reworked to properly use non-blocking I/O.
fn writev(self: Stream, iovecs: []const os.iovec_const) WriteError!usize
See https://github.com/ziglang/zig/issues/7699 See equivalent function: `std.fs…
See https://github.com/ziglang/zig/issues/7699 See equivalent function:
std.fs.File.writev
.fn writevAll(self: Stream, iovecs: []os.iovec_const) WriteError!void
The
iovecs
parameter is mutable because this function needs to mutate the fiel…The
iovecs
parameter is mutable because this function needs to mutate the fields in order to handle partial writes from the underlying OS layer. See https://github.com/ziglang/zig/issues/7699 See equivalent function:std.fs.File.writevAll
.