00001 /* 00002 * MulticastSocket.h 00003 * 00004 * Created on: 28.06.2010 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef MULTICASTSOCKET_H_ 00009 #define MULTICASTSOCKET_H_ 00010 00011 #include "ibrcommon/net/NetInterface.h" 00012 #include "ibrcommon/net/udpsocket.h" 00013 00014 namespace ibrcommon 00015 { 00016 class MulticastSocket : public ibrcommon::udpsocket 00017 { 00018 public: 00019 MulticastSocket(); 00020 virtual ~MulticastSocket(); 00021 00022 void bind(int port); 00023 00028 void setInterface(const NetInterface &iface); 00029 00030 void joinGroup(std::string group); 00031 void joinGroup(std::string group, const NetInterface &iface); 00032 00033 void leaveGroup(std::string group); 00034 void leaveGroup(std::string group, const NetInterface &iface); 00035 00036 static bool isMulticast(std::string address); 00037 }; 00038 } 00039 00040 #endif /* MULTICASTSOCKET_H_ */
1.5.6