NetworkAddress

Represents a network/socket address.

To construct a NetworkAddress, use either resolveHost or set the family property accordingly, followed by setting the fields of sockAddrInet4/sockAddrInet6/sockAddrUnix.

Constructors

this
this(libasync.events.NetworkAddress addr)
Undocumented in source.

Members

Functions

opCast
T opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
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]
AddressFamily family [@property setter]
ushort family [@property setter]

Family of the socket address.

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
int sockAddrLen [@property getter]

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

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

Meta