addrinfo.ipAddress

Obtains the current IP address in standard notation.

struct addrinfo
ipAddress
out (result) { if (result.length) assert (result.ptr is dst.ptr); }

Parameters

dst mstring

destination buffer

Return Value

Type: mstring

a slice to the resulting IP address string in dst on success or null on error. On error errno is set appropriately.

Errors: EAFNOSUPPORT: The address family is not supported (AF_INET/IPv4 or AF_INET6/IPv6).

In: - this.ai_addr must not be null: this instance should have been obtained by getaddrinfo() or manually initialised. - dst.length must be at least the required address length for the address family, INET_ADDRSTRLEN for IPv4 or INET6_ADDRSTRLEN for IPv6.

Out: If the resulting slice is not null, it slices dst from the beginning.

Meta