Attempts to retrieve the host address as a human-readable string.
Attempts to retrieve the host name as a fully qualified domain name.
Attempts to retrieve the numeric port number as a string.
Attempts to retrieve the service name as a string.
Human readable string representing this address.
Family of this address.
Returns pointer to underlying sockaddr structure.
Returns actual size of underlying sockaddr structure.
writeln("About www.google.com port 80:"); try { Address[] addresses = getAddress("www.google.com", 80); writefln(" %d addresses found.", addresses.length); foreach (int i, Address a; addresses) { writefln(" Address %d:", i+1); writefln(" IP address: %s", a.toAddrString()); writefln(" Hostname: %s", a.toHostNameString()); writefln(" Port: %s", a.toPortString()); writefln(" Service name: %s", a.toServiceNameString()); } } catch (SocketException e) writefln(" Lookup error: %s", e.msg);
Abstract class for representing a socket address.