Address.toV4

Get the address as an IPv4 address.

This method doesn't convert the address, so the address should be already an IPv4 one.

struct Address
inout @nogc nothrow pure @safe
toV4
()

Return Value

Type: Address4

IPv4 address.

Precondition: This is an IPv4 address.

Examples

auto expected = Address4.loopback;
assert(Address(expected).toV4() == expected);

Meta