| ... | ... | @@ -1080,6 +1080,9 @@ pub const Loop = struct { |
| 1080 | 1080 | .read => |*msg| { |
| 1081 | 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 | 1086 | .write => |*msg| { |
| 1084 | 1087 | msg.result = noasync os.write(msg.fd, msg.bytes); |
| 1085 | 1088 | }, |
| ... | ... | @@ -1174,6 +1177,7 @@ pub const Loop = struct { |
| 1174 | 1177 | |
| 1175 | 1178 | pub const Msg = union(enum) { |
| 1176 | 1179 | read: Read, |
| 1180 | readv: ReadV, |
| 1177 | 1181 | write: Write, |
| 1178 | 1182 | writev: WriteV, |
| 1179 | 1183 | pwritev: PWriteV, |
| ... | ... | @@ -1195,6 +1199,14 @@ pub const Loop = struct { |
| 1195 | 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 | 1210 | pub const Write = struct { |
| 1199 | 1211 | fd: os.fd_t, |
| 1200 | 1212 | bytes: []const u8, |