[wpinet] Wrap a number of newer libuv features (#4260)

This commit is contained in:
Peter Johnson
2022-05-22 20:18:23 -07:00
committed by GitHub
parent 816aa4e465
commit 013efdde25
7 changed files with 97 additions and 0 deletions

View File

@@ -117,6 +117,17 @@ void Udp::SetMembership(std::string_view multicastAddr,
interfaceAddrBuf.c_str(), membership);
}
void Udp::SetSourceMembership(std::string_view multicastAddr,
std::string_view interfaceAddr,
std::string_view sourceAddr,
uv_membership membership) {
SmallString<128> multicastAddrBuf{multicastAddr};
SmallString<128> interfaceAddrBuf{interfaceAddr};
SmallString<128> sourceAddrBuf{sourceAddr};
Invoke(&uv_udp_set_source_membership, GetRaw(), multicastAddrBuf.c_str(),
interfaceAddrBuf.c_str(), sourceAddrBuf.c_str(), membership);
}
void Udp::SetMulticastInterface(std::string_view interfaceAddr) {
SmallString<128> interfaceAddrBuf{interfaceAddr};
Invoke(&uv_udp_set_multicast_interface, GetRaw(), interfaceAddrBuf.c_str());