MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / operator ~

Method operator ~

base/poco/Net/src/IPAddress.cpp:462–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460
461
462IPAddress IPAddress::operator ~ () const
463{
464 if (family() == IPv4)
465 {
466 IPv4AddressImpl self(this->pImpl()->addr());
467 return IPAddress((~self).addr(), sizeof(struct in_addr));
468 }
469#if defined(POCO_HAVE_IPv6)
470 else if (family() == IPv6)
471 {
472 const IPv6AddressImpl self(pImpl()->addr(), pImpl()->scope());
473 const IPv6AddressImpl r = ~self;
474 return IPAddress(r.addr(), sizeof(struct in6_addr), r.scope());
475 }
476#endif
477 else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
478}
479
480
481poco_socklen_t IPAddress::length() const

Callers

nothing calls this directly

Calls 4

pImplMethod · 0.95
IPAddressClass · 0.50
addrMethod · 0.45
scopeMethod · 0.45

Tested by

no test coverage detected