Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void UDPSocket::leaveGroup ( const string &  multicastGroup  )  throw (SocketException)

Leave the specified multicast group.

Parameters:
multicastGroup multicast group address to leave
Exceptions:
SocketException thrown if unable to leave 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 }


Generated on Thu Jan 13 09:13:10 2011 for ImpalaSrc by  doxygen 1.5.1