#include <multicast.h>
Public Member Functions | |
CMulticast (const std::string &sInterface, uint32_t ip, uint16_t port) | |
virtual | ~CMulticast () |
int | SendFile (const std::string &sFileName, const std::string &sFileLoc) |
int | SendPacket (const std::string &s) |
Static Public Member Functions | |
static void | FileReceivedCallback (fileinfo *f) |
static void | SetSocketPair (int iFd) |
static int | GetSocketPairFd () |
Private Attributes | |
bool | m_bInit |
Static Private Attributes | |
static int | m_iFd = -1 |
CMulticast::CMulticast | ( | const std::string & | sInterface, | |
uint32_t | ip, | |||
uint16_t | port | |||
) |
Constructor of the class. Takes interface name, multicast IP address and port as its argument.
CMulticast::~CMulticast | ( | ) | [virtual] |
Destructor of the class.
void CMulticast::FileReceivedCallback | ( | fileinfo * | f | ) | [static] |
The network thread of the multicast library notifies about any downloaded file.
int CMulticast::SendFile | ( | const std::string & | sFileName, | |
const std::string & | sFileLoc | |||
) |
Sends the multicast file in the network.