| 83 | |
| 84 | |
| 85 | void 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 | |
| 101 | NetworkInterface MulticastSocket::getInterface() const |
nothing calls this directly
no test coverage detected