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

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

Join the specified multicast group.

Parameters:
multicastGroup multicast group address to join
Exceptions:
SocketException thrown if unable to join group

Definition at line 364 of file PracticalSocket.cpp.

References Socket::sockDesc.

00364                                                                              {
00365   struct ip_mreq multicastRequest;
00366 
00367   multicastRequest.imr_multiaddr.s_addr = inet_addr(multicastGroup.c_str());
00368   multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
00369   if (setsockopt(sockDesc, IPPROTO_IP, IP_ADD_MEMBERSHIP, 
00370                  (raw_type *) &multicastRequest, 
00371                  sizeof(multicastRequest)) < 0) {
00372     throw SocketException("Multicast group join failed (setsockopt())", true);
00373   }
00374 }


Generated on Fri Mar 19 10:32:59 2010 for ImpalaSrc by  doxygen 1.5.1