| ... | @@ -87,6 +87,8 @@ pub const Address = extern union { | ... | @@ -87,6 +87,8 @@ pub const Address = extern union { |
| 87 | pub const Ip4Address = extern struct { | 87 | pub const Ip4Address = extern struct { |
| 88 | sa: sys.struct_sockaddr_in, | 88 | sa: sys.struct_sockaddr_in, |
| 89 | | 89 | |
| | 90 | pub const SockAddr = sys.struct_sockaddr_in; |
| | 91 | |
| 90 | pub fn init(addr: [4]u8, port: u16) Ip4Address { | 92 | pub fn init(addr: [4]u8, port: u16) Ip4Address { |
| 91 | return Ip4Address{ | 93 | return Ip4Address{ |
| 92 | .sa = .{ | 94 | .sa = .{ |
| ... | @@ -100,6 +102,8 @@ pub const Ip4Address = extern struct { | ... | @@ -100,6 +102,8 @@ pub const Ip4Address = extern struct { |
| 100 | pub const Ip6Address = extern struct { | 102 | pub const Ip6Address = extern struct { |
| 101 | sa: sys.struct_sockaddr_in6, | 103 | sa: sys.struct_sockaddr_in6, |
| 102 | | 104 | |
| | 105 | pub const SockAddr = sys.struct_sockaddr_in6; |
| | 106 | |
| 103 | pub fn init(addr: [8]u16, port: u16) Ip6Address { | 107 | pub fn init(addr: [8]u16, port: u16) Ip6Address { |
| 104 | return Ip6Address{ | 108 | return Ip6Address{ |
| 105 | .sa = .{ | 109 | .sa = .{ |
| ... | @@ -197,3 +201,7 @@ pub const Server = struct { | ... | @@ -197,3 +201,7 @@ pub const Server = struct { |
| 197 | } | 201 | } |
| 198 | }; | 202 | }; |
| 199 | }; | 203 | }; |
| | 204 | |
| | 205 | pub const getaddrinfo = sys.getaddrinfo; |
| | 206 | |
| | 207 | pub const freeaddrinfo = sys.freeaddrinfo; |