| ... | ... | @@ -282,7 +282,11 @@ test "tcp: create client/listener pair" { |
| 282 | 282 | try listener.bind(ip.Address.initIPv4(IPv4.unspecified, 0)); |
| 283 | 283 | try listener.listen(128); |
| 284 | 284 | |
| 285 | | const binded_address = try listener.getLocalAddress(); |
| 285 | var binded_address = try listener.getLocalAddress(); |
| 286 | switch (binded_address) { |
| 287 | .ipv4 => |*ipv4| ipv4.host = IPv4.localhost, |
| 288 | .ipv6 => |*ipv6| ipv6.host = IPv6.localhost, |
| 289 | } |
| 286 | 290 | |
| 287 | 291 | const client = try tcp.Client.init(.ip, os.SOCK_CLOEXEC); |
| 288 | 292 | defer client.deinit(); |
| ... | ... | @@ -302,7 +306,11 @@ test "tcp/client: set read timeout of 1 millisecond on blocking client" { |
| 302 | 306 | try listener.bind(ip.Address.initIPv4(IPv4.unspecified, 0)); |
| 303 | 307 | try listener.listen(128); |
| 304 | 308 | |
| 305 | | const binded_address = try listener.getLocalAddress(); |
| 309 | var binded_address = try listener.getLocalAddress(); |
| 310 | switch (binded_address) { |
| 311 | .ipv4 => |*ipv4| ipv4.host = IPv4.localhost, |
| 312 | .ipv6 => |*ipv6| ipv6.host = IPv6.localhost, |
| 313 | } |
| 306 | 314 | |
| 307 | 315 | const client = try tcp.Client.init(.ip, os.SOCK_CLOEXEC); |
| 308 | 316 | defer client.deinit(); |