Function Address.toV4

Get the address as an IPv4 address.

ref inout inout(Address4) toV4() pure nothrow @nogc @safe;

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

Returns

IPv4 address.

Precondition

This is an IPv4 address.

Example

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