IBR-DTNSuite  0.8
ibrcommon/ibrcommon/net/MulticastSocket.h
Go to the documentation of this file.
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/vinterface.h"
00012 #include "ibrcommon/net/vaddress.h"
00013 #include "ibrcommon/net/udpsocket.h"
00014 
00015 namespace ibrcommon
00016 {
00021         class MulticastSocket
00022         {
00023         public:
00024                 MulticastSocket(const int fd);
00025                 virtual ~MulticastSocket();
00026 
00031                 void setInterface(const vinterface &iface);
00032 
00037                 void joinGroup(const vaddress &group);
00038 
00044                 void joinGroup(const vaddress &group, const vinterface &iface);
00045 
00050                 void leaveGroup(const vaddress &group);
00051 
00057                 void leaveGroup(const vaddress &group, const vinterface &iface);
00058 
00059         private:
00060                 int _fd;
00061         };
00062 }
00063 
00064 #endif /* MULTICASTSOCKET_H_ */