authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-04 18:09:46 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-04 18:09:46 -08:00
log69ac8a251783363d5299df684d947474be60793a
treed831b952927063a7fe0988635f0be8b1bb1e98c4
parent864fd0043032051f066882ee7252a0fb60e04219

add getaddrinfo/freeaddrinfo


1 files changed, 8 insertions(+), 0 deletions(-)

net.zig+8
......@@ -87,6 +87,8 @@ pub const Address = extern union {
8787pub const Ip4Address = extern struct {
8888 sa: sys.struct_sockaddr_in,
8989
90 pub const SockAddr = sys.struct_sockaddr_in;
91
9092 pub fn init(addr: [4]u8, port: u16) Ip4Address {
9193 return Ip4Address{
9294 .sa = .{
......@@ -100,6 +102,8 @@ pub const Ip4Address = extern struct {
100102pub const Ip6Address = extern struct {
101103 sa: sys.struct_sockaddr_in6,
102104
105 pub const SockAddr = sys.struct_sockaddr_in6;
106
103107 pub fn init(addr: [8]u16, port: u16) Ip6Address {
104108 return Ip6Address{
105109 .sa = .{
......@@ -197,3 +201,7 @@ pub const Server = struct {
197201 }
198202 };
199203};
204
205pub const getaddrinfo = sys.getaddrinfo;
206
207pub const freeaddrinfo = sys.freeaddrinfo;