Skip to main contentModule endpoint
Source - Addr
- Addr defines a type for an address, either IP or domain.
- Endpoint
- Endpoint defines generic network endpoints for karyon.
- DNS_TIMEOUT ๐
- Max time to wait for a DNS lookup.
- ToEndpoint
- resolve ๐
- Resolve an
Addr + port to a SocketAddr. Domains are resolved
through the system DNS with the given port. - resolve_endpoint ๐
- Async version of
SocketAddr::try_from(endpoint). Domains are resolved
on a blocking thread pool under a timeout, so DNS never blocks the
executor. - url_to_addr ๐
- write_addr ๐
- Writes
scheme://addr:port. An IPv6 address goes inside brackets, so
the output parses back to the same endpoint.
- Port
- Port defined as a u16.