SockAddr

A D representation of a sockaddr struct

This is how sockaddr might have looked like had C supported inheritence

Constructors

this
this(sockaddr* sa, socklen_t length)
this(SockAddrIPv4 sa)
this(SockAddrIPv6 sa)
this(SockAddrUnix sa)

Construct a SockAddr

Members

Functions

toString
string toString()

Return a GC allocated string representing the address

toStringAddr
string toStringAddr()

Convert just the address part to a GC allocated string

toStringPort
string toStringPort()

Convert just the port part to a GC allocated string

Properties

family
sa_family_t family [@property getter]

Return the address family

len
uint len [@property getter]

Returns the length of the data in the struct

Static functions

resolve
SockAddr resolve(string hostname, string service, ushort family, int sockType)

Perform a name resolution on the given string

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta