| ... | ... | @@ -2590,9 +2590,9 @@ fn operate(userdata: ?*anyopaque, operation: Io.Operation) Io.Cancelable!Io.Oper |
| 2590 | 2590 | }, |
| 2591 | 2591 | .net_write => |o| return .{ |
| 2592 | 2592 | .net_write = (if (is_windows) |
| 2593 | | netWriteWindows(o.socket_handle, o.header, o.data, o.splat) |
| 2593 | netWriteWindows(o.socket_handle, o.header, o.data, o.splat, o.control) |
| 2594 | 2594 | else |
| 2595 | | netWritePosix(o.socket_handle, o.header, o.data, o.splat)) catch |err| switch (err) { |
| 2595 | netWritePosix(o.socket_handle, o.header, o.data, o.splat, o.control)) catch |err| switch (err) { |
| 2596 | 2596 | error.Canceled => |e| return e, |
| 2597 | 2597 | else => |e| e, |
| 2598 | 2598 | }, |
| ... | ... | @@ -3306,7 +3306,7 @@ fn batchDrainSubmittedWindows(t: *Threaded, b: *Io.Batch, concurrency: bool) (Io |
| 3306 | 3306 | // TODO integrate with overlapped I/O or equivalent to avoid this error |
| 3307 | 3307 | if (concurrency) return error.ConcurrencyUnavailable; |
| 3308 | 3308 | batchCompleteBlockingWindows(b, operation_userdata, .{ |
| 3309 | | .net_write = netWriteWindows(o.socket_handle, o.header, o.data, o.splat) catch |err| switch (err) { |
| 3309 | .net_write = netWriteWindows(o.socket_handle, o.header, o.data, o.splat, o.control) catch |err| switch (err) { |
| 3310 | 3310 | error.Canceled => |e| return e, |
| 3311 | 3311 | else => |e| e, |
| 3312 | 3312 | }, |
| ... | ... | @@ -13389,6 +13389,7 @@ fn netWritePosix( |
| 13389 | 13389 | header: []const u8, |
| 13390 | 13390 | data: []const []const u8, |
| 13391 | 13391 | splat: usize, |
| 13392 | control: []const u8, |
| 13392 | 13393 | ) net.Stream.Writer.Error!usize { |
| 13393 | 13394 | if (!have_networking) return error.NetworkDown; |
| 13394 | 13395 | |
| ... | ... | @@ -13398,8 +13399,8 @@ fn netWritePosix( |
| 13398 | 13399 | .namelen = 0, |
| 13399 | 13400 | .iov = &iovecs, |
| 13400 | 13401 | .iovlen = 0, |
| 13401 | | .control = null, |
| 13402 | | .controllen = 0, |
| 13402 | .control = if (control.len == 0) null else @constCast(control.ptr), |
| 13403 | .controllen = @intCast(control.len), |
| 13403 | 13404 | .flags = 0, |
| 13404 | 13405 | }; |
| 13405 | 13406 | addBuf(&iovecs, &msg.iovlen, header); |
| ... | ... | @@ -13481,9 +13482,13 @@ fn netWriteWindows( |
| 13481 | 13482 | header: []const u8, |
| 13482 | 13483 | data: []const []const u8, |
| 13483 | 13484 | splat: usize, |
| 13485 | control: []const u8, |
| 13484 | 13486 | ) net.Stream.Writer.Error!usize { |
| 13485 | 13487 | if (!have_networking) return error.NetworkDown; |
| 13486 | 13488 | |
| 13489 | // Windows doesn't have the concept of control/ancillary data. |
| 13490 | _ = control; |
| 13491 | |
| 13487 | 13492 | var iovecs: [max_iovecs_len]windows.AFD.WSABUF(.@"const") = undefined; |
| 13488 | 13493 | var len: u32 = 0; |
| 13489 | 13494 | addAfdBuf(.@"const", &iovecs, &len, header); |