diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-10-28 10:03:23 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-10-28 10:03:23 +0100 |
| commit | 7f4667219339e92dc75e7dfd5f0078f229804567 (patch) | |
| tree | 07306346291fd98b13c12fa415abd1383ab9b048 /lib/std/net | |
| parent | 1ea0d40e5e07a5fe615355d4c33832ed3c81f8c3 (diff) | |
| download | zig-7f4667219339e92dc75e7dfd5f0078f229804567.tar.gz zig-7f4667219339e92dc75e7dfd5f0078f229804567.zip | |
More fixups for Windows targets
* Use closeSocket on sockets instead of plain old close, the latter
doesn't work on them.
* Use winsocket2 everywhere, mingw has no BSD sockets.
Diffstat (limited to 'lib/std/net')
| -rw-r--r-- | lib/std/net/test.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig index 8a7b5717f2..9f40bb5a3b 100644 --- a/lib/std/net/test.zig +++ b/lib/std/net/test.zig @@ -148,6 +148,8 @@ test "listen on a port, send bytes, receive bytes" { const localhost = try net.Address.parseIp("127.0.0.1", 8080); var server = net.StreamServer.init(.{}); + defer server.deinit(); + try server.listen(localhost); const S = struct { |
