| ... | ... | @@ -87,6 +87,8 @@ pub const Address = extern union { |
| 87 | 87 | pub const Ip4Address = extern struct { |
| 88 | 88 | sa: sys.struct_sockaddr_in, |
| 89 | 89 | |
| 90 | pub const SockAddr = sys.struct_sockaddr_in; |
| 91 | |
| 90 | 92 | pub fn init(addr: [4]u8, port: u16) Ip4Address { |
| 91 | 93 | return Ip4Address{ |
| 92 | 94 | .sa = .{ |
| ... | ... | @@ -100,6 +102,8 @@ pub const Ip4Address = extern struct { |
| 100 | 102 | pub const Ip6Address = extern struct { |
| 101 | 103 | sa: sys.struct_sockaddr_in6, |
| 102 | 104 | |
| 105 | pub const SockAddr = sys.struct_sockaddr_in6; |
| 106 | |
| 103 | 107 | pub fn init(addr: [8]u16, port: u16) Ip6Address { |
| 104 | 108 | return Ip6Address{ |
| 105 | 109 | .sa = .{ |
| ... | ... | @@ -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; |