replace Address.parse Address.parseIp

master
Luna 2019-11-08 19:59:30 -03:00
parent 5d05cfcfe6
commit 9458620e18
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ pub const Address = extern union {
switch (family) {
os.AF_INET => return parseIp4(name, port),
os.AF_INET6 => return parseIp6(name, port),
os.AF_UNSPEC => return parse(name, port),
os.AF_UNSPEC => return parseIp(name, port),
else => unreachable,
}
}
@ -1034,7 +1034,7 @@ fn linuxLookupNameFromNumericUnspec(
name: []const u8,
port: u16,
) !void {
const addr = try Address.parse(name, port);
const addr = try Address.parseIp(name, port);
(try addrs.addOne()).* = LookupAddr{ .addr = addr };
}

View File

@ -91,7 +91,7 @@ test "listen on a port, send bytes, receive bytes" {
}
// TODO doing this at comptime crashed the compiler
const localhost = net.Address.parse("127.0.0.1", 0);
const localhost = net.Address.parseIp("127.0.0.1", 0);
var server = net.TcpServer.init(net.TcpServer.Options{});
defer server.deinit();