Leave the specified multicast group.
Definition at line 376 of file PracticalSocket.cpp. References Socket::sockDesc. 00376 { 00377 struct ip_mreq multicastRequest; 00378 00379 multicastRequest.imr_multiaddr.s_addr = inet_addr(multicastGroup.c_str()); 00380 multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY); 00381 if (setsockopt(sockDesc, IPPROTO_IP, IP_DROP_MEMBERSHIP, 00382 (raw_type *) &multicastRequest, 00383 sizeof(multicastRequest)) < 0) { 00384 throw SocketException("Multicast group leave failed (setsockopt())", true); 00385 } 00386 }
|