MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / setInterface

Method setInterface

base/poco/Net/src/MulticastSocket.cpp:85–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85void MulticastSocket::setInterface(const NetworkInterface& interfc)
86{
87 if (address().family() == SocketAddress::IPv4)
88 {
89 impl()->setOption(IPPROTO_IP, IP_MULTICAST_IF, interfc.firstAddress(IPAddress::IPv4));
90 }
91#if defined(POCO_HAVE_IPv6)
92 else if (address().family() == SocketAddress::IPv6)
93 {
94 impl()->setOption(IPPROTO_IPV6, IPV6_MULTICAST_IF, interfc.index());
95 }
96#endif
97 else throw UnsupportedFamilyException("Unknown or unsupported socket family.");
98}
99
100
101NetworkInterface MulticastSocket::getInterface() const

Callers

nothing calls this directly

Calls 4

firstAddressMethod · 0.80
familyMethod · 0.45
setOptionMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected