NetworkAddress

Represents a network/socket address. (adapted from vibe.core.net)

Constructors

this
this(sockaddr* addr, socklen_t addrlen)
Undocumented in source.
this
this(PhobosAddress address)
Undocumented in source.

Members

Functions

toAddressString
void toAddressString(void delegate(const(char)[]) @(safe) sink)

Returns a string representation of the IP address

toAddressString
string toAddressString()

Returns a string representation of the IP address

toString
string toString()
void toString(void delegate(const(char)[]) @(safe) sink)

Returns a full string representation of the address, including the port number.

Properties

family
ushort family [@property getter]
ushort family [@property setter]

Family (AF_) of the socket address.

ipv6
bool ipv6 [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
port
ushort port [@property getter]
ushort port [@property setter]

The port in host byte order.

sockAddr
inout(sockaddr)* sockAddr [@property getter]

A pointer to a sockaddr struct suitable for passing to socket functions.

sockAddrInet4
inout(sockaddr_in)* sockAddrInet4 [@property getter]
Undocumented in source.
sockAddrInet6
inout(sockaddr_in6)* sockAddrInet6 [@property getter]
Undocumented in source.
sockAddrLen
socklen_t sockAddrLen [@property getter]

Size of the sockaddr struct that is returned by sockAddr().

sockAddrMaxLen
socklen_t sockAddrMaxLen [@property getter]

Maximum size of any sockaddr struct, regardless of address family.

sockAddrUnix
inout(sockaddr_un)* sockAddrUnix [@property getter]
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta