Struct SockAddr
A D representation of a sockaddr
struct
struct SockAddr
;
This is how sockaddr
might have looked like had C supported inheritence
Constructors
Name | Description |
---|---|
this
|
Construct a SockAddr |
Fields
Name | Type | Description |
---|---|---|
base
|
core | SockAddr as a sockaddr
|
ipv4
|
SockAddrIPv4 | SockAddr as a SockAddrIPv4 |
ipv6
|
SockAddrIPv6 | SockAddr as a SockAddrIPv6 |
unix
|
SockAddrUnix | SockAddr as a SockAddrUnix |
Properties
Name | Type | Description |
---|---|---|
family [get]
|
ushort | Return the address family |
len [get]
|
uint | Returns the length of the data in the struct |
Methods
Name | Description |
---|---|
resolve
|
Perform a name resolution on the given string |
toString
|
Return a GC allocated string representing the address |
toStringAddr
|
Convert just the address part to a GC allocated string |
toStringPort
|
Convert just the port part to a GC allocated string |