folly::IPAddress::tryFromBinary

Non-throwing version of fromBinary(). On failure returns IPAddressFormatError.

Synopsis

Declared in <folly/IPAddress.h>

static
Expected<IPAddress, IPAddressFormatError>
tryFromBinary(ByteRange bytes) noexcept;

Return Value

The parsed IPAddress, or an IPAddressFormatError on failure.

Parameters

NameDescription
bytesThe binary address data in network byte order.