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 { 00020 class MulticastSocket : public ibrcommon::udpsocket 00021 { 00022 public: 00023 MulticastSocket(); 00024 virtual ~MulticastSocket(); 00025 00030 void bind(int port); 00031 00036 void setInterface(const NetInterface &iface); 00037 00042 void joinGroup(std::string group); 00043 00049 void joinGroup(std::string group, const NetInterface &iface); 00050 00055 void leaveGroup(std::string group); 00056 00062 void leaveGroup(std::string group, const NetInterface &iface); 00063 00069 static bool isMulticast(std::string address); 00070 }; 00071 } 00072 00073 #endif /* MULTICASTSOCKET_H_ */
1.7.1