-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmulticastsocket.hpp
35 lines (26 loc) · 1.06 KB
/
multicastsocket.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MULTICAST_SOCKET_HPP
#define MULTICAST_SOCKET_HPP 1
#include "upnpsocket.hpp"
START_DEFINE_UPNP_NAMESPACE
/*! \brief Provides the mechanism to manage multicast sockets. */
class CMulticastSocket : public CUpnpSocket
{
public :
/*! Default constructor. */
CMulticastSocket (QObject* parent = nullptr);
/*! Destructor. */
virtual ~CMulticastSocket ();
/*! Binds to IPV4 address on port multicastPort and join the multicast group.
* \param bindAddr: Generally QHostAddress::AnyIPv4 ou QHostAddress::AnyIPv6.
* \param group: Generally 239.255.255.250 or FF02::C.
* \return True in case of success.
*/
bool initialize (QHostAddress const & bindAddr, QHostAddress const & group);
static QHostAddress const upnpMulticastAddr; //!< Standard multicast IPV4 address.
static QHostAddress const upnpMulticastAddr6; //!< Standard multicast IPV4 address.
static quint16 const upnpMulticastPort; //!< Standard multicats port.
private :
QHostAddress m_group; //!< Save the join group.
};
} // End namespace
#endif