folly::IPAddress::createIPv4

Return the IPAddressV4 representation of the address, converting from V6 to V4 if needed.

Synopsis

Declared in <folly/IPAddress.h>

static
IPAddressV4
createIPv4(IPAddress const& addr);

Description

Throws IPAddressFormatException if the V6 Address is not IPv4 mapped.

Return Value

The IPAddressV4 representation of addr.

Parameters

NameDescription
addrThe address to convert.