diff options
Diffstat (limited to 'lib/std/event/loop.zig')
| -rw-r--r-- | lib/std/event/loop.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 617603c020..f0ac85d4f0 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -1080,6 +1080,9 @@ pub const Loop = struct { .read => |*msg| { msg.result = noasync os.read(msg.fd, msg.buf); }, + .readv => |*msg| { + msg.result = noasync os.readv(msg.fd, msg.iov); + }, .write => |*msg| { msg.result = noasync os.write(msg.fd, msg.bytes); }, @@ -1174,6 +1177,7 @@ pub const Loop = struct { pub const Msg = union(enum) { read: Read, + readv: ReadV, write: Write, writev: WriteV, pwritev: PWriteV, @@ -1195,6 +1199,14 @@ pub const Loop = struct { pub const Error = os.ReadError; }; + pub const ReadV = struct { + fd: os.fd_t, + iov: []const os.iovec, + result: Error!usize, + + pub const Error = os.ReadError; + }; + pub const Write = struct { fd: os.fd_t, bytes: []const u8, |
