Internet6Address

Encapsulates an IPv6 (Internet Protocol version 6) socket address.

Consider using getAddress, parseAddress and Address methods instead of using this class directly.

Constructors

this
this(const(char)[] addr, const(char)[] service)

Construct a new Internet6Address.

this
this(const(char)[] addr, ushort port)

Construct a new Internet6Address.

this
this(ubyte[16] addr, ushort port)
this(ushort port)

Construct a new Internet6Address.

this
this(sockaddr_in6 addr)

Construct a new Internet6Address.

Members

Properties

ADDR_ANY
const(ubyte)[16] ADDR_ANY [@property getter]

Any IPv6 host address.

addr
ubyte[16] addr [@property getter]

Returns the IPv6 address.

port
ushort port [@property getter]

Returns the IPv6 port number.

Static functions

parse
ubyte[16] parse(const(char)[] addr)

Parse an IPv6 host address string as described in RFC 2373, and return the address.

Variables

PORT_ANY
enum ushort PORT_ANY;

Any IPv6 port number.

Inherited Members

From Address

name
sockaddr* name [@property getter]

Returns pointer to underlying sockaddr structure.

nameLen
socklen_t nameLen [@property getter]

Returns actual size of underlying sockaddr structure.

addressFamily
AddressFamily addressFamily [@property getter]

Family of this address.

toAddrString
string toAddrString()

Attempts to retrieve the host address as a human-readable string.

toHostNameString
string toHostNameString()

Attempts to retrieve the host name as a fully qualified domain name.

toPortString
string toPortString()

Attempts to retrieve the numeric port number as a string.

toServiceNameString
string toServiceNameString()

Attempts to retrieve the service name as a string.

toString
string toString()

Human readable string representing this address.

Meta