MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / leaveGroup

Method leaveGroup

tools/streamer_recorder/PracticalSocket.cpp:373–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void UDPSocket::leaveGroup(const string &multicastGroup) throw(SocketException) {
374 struct ip_mreq multicastRequest;
375
376 multicastRequest.imr_multiaddr.s_addr = inet_addr(multicastGroup.c_str());
377 multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
378 if (setsockopt(sockDesc, IPPROTO_IP, IP_DROP_MEMBERSHIP,
379 (raw_type *) &multicastRequest,
380 sizeof(multicastRequest)) < 0) {
381 throw SocketException("Multicast group leave failed (setsockopt())", true);
382 }
383}

Callers

nothing calls this directly

Calls 1

SocketExceptionClass · 0.85

Tested by

no test coverage detected