aboutsummaryrefslogtreecommitdiff
path: root/lib/std/net
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-11-22 10:29:45 +0100
committerLemonBoy <thatlemon@gmail.com>2021-01-11 21:43:15 +0100
commit34720da3d0a4a98383639cbedcbe1aa885217ed6 (patch)
tree183937da172d8cacda17a88df9a479bf4f2403ee /lib/std/net
parentd0beb4badb9064893133c996b05c0748317adf24 (diff)
downloadzig-34720da3d0a4a98383639cbedcbe1aa885217ed6.tar.gz
zig-34720da3d0a4a98383639cbedcbe1aa885217ed6.zip
Apparently unix sockets are supported on Windows
Starting from Windows 10 build 17063.
Diffstat (limited to 'lib/std/net')
-rw-r--r--lib/std/net/test.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig
index 12eb7c6cb2..10a9c4e18b 100644
--- a/lib/std/net/test.zig
+++ b/lib/std/net/test.zig
@@ -258,6 +258,15 @@ test "listen on a unix socket, send bytes, receive bytes" {
if (builtin.single_threaded) return error.SkipZigTest;
if (!net.has_unix_sockets) return error.SkipZigTest;
+ if (std.builtin.os.tag == .windows) {
+ _ = try std.os.windows.WSAStartup(2, 2);
+ }
+ defer {
+ if (std.builtin.os.tag == .windows) {
+ std.os.windows.WSACleanup() catch unreachable;
+ }
+ }
+
var server = net.StreamServer.init(.{});
defer server.deinit();