mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
add missing CONNECTION_REFUSED and CONNECTION_RESET errors for windows
Adds missing errors CONNECTION_REFUSED for netConnectIpWindows and CONNECTION_RESET for both netReadWindows and netWriteWindows. I'm able to induce these 3 errors on my Windows 11 machine.
This commit is contained in:
committed by
Andrew Kelley
parent
fb9ba5e4b3
commit
23bcb8148f
@@ -12255,6 +12255,7 @@ fn netConnectIpWindows(
|
||||
.SUCCESS => {},
|
||||
.CANCELLED => unreachable,
|
||||
.INSUFFICIENT_RESOURCES => return error.SystemResources,
|
||||
.CONNECTION_REFUSED => return error.ConnectionRefused,
|
||||
else => |status| return windows.unexpectedStatus(status),
|
||||
}
|
||||
return .{ .handle = socket_handle, .address = bound_address };
|
||||
@@ -12792,6 +12793,7 @@ fn netReadWindows(socket_handle: net.Socket.Handle, data: [][]u8) net.Stream.Rea
|
||||
.SUCCESS => return iosb.Information,
|
||||
.CANCELLED => unreachable,
|
||||
.INSUFFICIENT_RESOURCES => return error.SystemResources,
|
||||
.CONNECTION_RESET => return error.ConnectionResetByPeer,
|
||||
else => |status| return windows.unexpectedStatus(status),
|
||||
}
|
||||
}
|
||||
@@ -13301,6 +13303,7 @@ fn netWriteWindows(
|
||||
.SUCCESS => return iosb.Information,
|
||||
.CANCELLED => unreachable,
|
||||
.INSUFFICIENT_RESOURCES => return error.SystemResources,
|
||||
.CONNECTION_RESET => return error.ConnectionResetByPeer,
|
||||
else => |status| return windows.unexpectedStatus(status),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user