diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 17:50:49 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 17:50:49 +0100 |
| commit | f6134422e647290eaae473ec60683a2ebb7198e0 (patch) | |
| tree | 1fb14d1f7b67e9102332aca8b2e29aaeb3df15f2 | |
| parent | 5c05038af0e005600451f195351f2178d352debc (diff) | |
Fix one last review comment.
| -rw-r--r-- | core/net/addr.odin | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/net/addr.odin b/core/net/addr.odin index 83d4a0ead..f12799d4d 100644 --- a/core/net/addr.odin +++ b/core/net/addr.odin @@ -403,7 +403,8 @@ Host_Or_Endpoint :: union { Endpoint, } Parse_Endpoint_Error :: enum { - Bad_Port = 1, + None = 0, + Bad_Port = 1, Bad_Address, Bad_Hostname, } @@ -416,12 +417,12 @@ parse_hostname_or_endpoint :: proc(endpoint_str: string) -> (target: Host_Or_End return nil, .Bad_Port } if addr := parse_address(host); addr != nil { - return Endpoint{addr, port}, nil + return Endpoint{addr, port}, .None } if !validate_hostname(host) { return nil, .Bad_Hostname } - return Host{host, port}, nil + return Host{host, port}, .None } @@ -742,6 +743,6 @@ parse_ip_component :: proc(input: string, max_value := u64(max(u32)), bases := D // Returns an address for each interface that can be bound to. get_network_interfaces :: proc() -> []Address { - // TODO + // TODO: Implement using `enumerate_interfaces` and returning only the addresses of active interfaces. return nil }
\ No newline at end of file |