| ... | @@ -1080,6 +1080,9 @@ pub const Loop = struct { | ... | @@ -1080,6 +1080,9 @@ pub const Loop = struct { |
| 1080 | .read => |*msg| { | 1080 | .read => |*msg| { |
| 1081 | msg.result = noasync os.read(msg.fd, msg.buf); | 1081 | msg.result = noasync os.read(msg.fd, msg.buf); |
| 1082 | }, | 1082 | }, |
| | 1083 | .readv => |*msg| { |
| | 1084 | msg.result = noasync os.readv(msg.fd, msg.iov); |
| | 1085 | }, |
| 1083 | .write => |*msg| { | 1086 | .write => |*msg| { |
| 1084 | msg.result = noasync os.write(msg.fd, msg.bytes); | 1087 | msg.result = noasync os.write(msg.fd, msg.bytes); |
| 1085 | }, | 1088 | }, |
| ... | @@ -1174,6 +1177,7 @@ pub const Loop = struct { | ... | @@ -1174,6 +1177,7 @@ pub const Loop = struct { |
| 1174 | | 1177 | |
| 1175 | pub const Msg = union(enum) { | 1178 | pub const Msg = union(enum) { |
| 1176 | read: Read, | 1179 | read: Read, |
| | 1180 | readv: ReadV, |
| 1177 | write: Write, | 1181 | write: Write, |
| 1178 | writev: WriteV, | 1182 | writev: WriteV, |
| 1179 | pwritev: PWriteV, | 1183 | pwritev: PWriteV, |
| ... | @@ -1195,6 +1199,14 @@ pub const Loop = struct { | ... | @@ -1195,6 +1199,14 @@ pub const Loop = struct { |
| 1195 | pub const Error = os.ReadError; | 1199 | pub const Error = os.ReadError; |
| 1196 | }; | 1200 | }; |
| 1197 | | 1201 | |
| | 1202 | pub const ReadV = struct { |
| | 1203 | fd: os.fd_t, |
| | 1204 | iov: []const os.iovec, |
| | 1205 | result: Error!usize, |
| | 1206 | |
| | 1207 | pub const Error = os.ReadError; |
| | 1208 | }; |
| | 1209 | |
| 1198 | pub const Write = struct { | 1210 | pub const Write = struct { |
| 1199 | fd: os.fd_t, | 1211 | fd: os.fd_t, |
| 1200 | bytes: []const u8, | 1212 | bytes: []const u8, |