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
ref inout @nogc nothrow pure @safe
inout(Address4)
toV4
()

Return Value

Type: inout(Address4)

IPv4 address.

Precondition: This is an IPv4 address.

Examples

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

Meta