Fields

handle: os.socket_t,

Functions

fn close(self: Stream) void

No documentation provided.

fn read(self: Stream, buffer: []u8) ReadError!usize

No documentation provided.

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 than len it means the stream reached the end. Reaching the end of the stream is not an error condition.

fn reader(self: Stream) Reader

No documentation provided.

fn readv(s: Stream, iovecs: []const os.iovec) ReadError!usize

No documentation provided.

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 writeAll(self: Stream, bytes: []const u8) WriteError!void

No documentation provided.

fn writer(self: Stream) Writer

No documentation provided.

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.

Values

ReadError
type
Reader
undefined
WriteError
type
Writer
undefined