Skip to content
Matt Fichman edited this page Dec 20, 2012 · 8 revisions

Stores the IP address and port number of a host. An Addr object can be constructed from a string, which is in the format 'ip.ip.ip.ip:port' for an IPv4 address and '[ipv6]:port' for an IPv6 address. A hostname can also be used in place of an IP address, in which case the IP address is looked up automatically.

@init(str String, port Int)

Initializes this IP address by parsing 'str'. If the parsing fails, then the 'valid' attribute will be set to false.

Returns the hostname associated with the socket's IP address. Lazily calls gethostbyname() to determine the hostname.

No comment

No comment

ip?() Int

No comment

No comment

No comment

Clone this wiki locally