std/ip
The addresses of the Internet Protocol as values: an IPv4 address, an IPv6 address, an address of either version, and a socket address - an address and a port. Each is read from text and shown as text (RFC 5952 for IPv6), compared and hashed like any other value.
std/ip touches nothing: it has no natives and needs no capability, so a package that only names an address - a URI
with an IP literal host, a configuration file - does not claim the network by importing it. std/network connects to
these addresses and re-exports every name of this package (docs/design/URI.md section 8a).
const local = SocketAddress(IpAddress.loopback, 8080)
print local
Modules
std/ip/addressIP addresses and socket addresses: values like any other, parsed from text and shown as text (docs/design/OS.md section 5.5, docs/design/NETWORK.md section 4, docs/design/URI.md section 8a).
Everything
- type
AddressErrorText that is not an address of the kind it was read as, and why. - type
IpAddressEither version. - type
Ipv4AddressAn IPv4 address: four octets, held as one number from 0 to 4294967295. - type
Ipv6AddressAn IPv6 address: eight 16-bit segments, held as two 64-bit halves. - type
SocketAddressAn IP address and a port: where a listener listens and where a connection goes.