|
| | MulticastManager (ObjectBase *parent=nullptr) |
| | Constructs a MulticastManager.
|
| |
|
| ~MulticastManager () override |
| | Destructor. Leaves all managed groups.
|
| |
| Error | joinGroup (const SocketAddress &group, UdpSocket *socket) |
| | Joins a multicast group on a socket.
|
| |
| Error | joinGroup (const SocketAddress &group, UdpSocket *socket, const String &iface) |
| | Joins a multicast group on a specific interface.
|
| |
| Error | leaveGroup (const SocketAddress &group, UdpSocket *socket) |
| | Leaves a multicast group on a socket.
|
| |
|
void | leaveAllGroups () |
| | Leaves all managed multicast groups.
|
| |
|
List< SocketAddress > | activeGroups () const |
| | Returns a list of all active multicast group addresses.
|
| |
| bool | isMemberOf (const SocketAddress &group) const |
| | Returns true if any socket is a member of the group.
|
| |
| Error | joinSourceGroup (const SocketAddress &group, const SocketAddress &source, UdpSocket *socket) |
| | Joins a Source-Specific Multicast group.
|
| |
| Error | leaveSourceGroup (const SocketAddress &group, const SocketAddress &source, UdpSocket *socket) |
| | Leaves a Source-Specific Multicast group.
|
| |
| void | setDefaultInterface (const String &iface) |
| | Sets the default network interface for joins.
|
| |
|
const String & | defaultInterface () const |
| | Returns the default interface name.
|
| |
| | PROMEKI_SIGNAL (groupJoined, SocketAddress) |
| | Emitted when a multicast group is joined.
|
| |
| | PROMEKI_SIGNAL (groupLeft, SocketAddress) |
| | Emitted when a multicast group is left.
|
| |
| | ObjectBase (ObjectBase *p=nullptr) |
| | Default ObjectBase constructor.
|
| |
|
virtual | ~ObjectBase () |
| | Destructor. Emits aboutToDestroy, detaches from parent, and destroys children.
|
| |
| ObjectBase * | parent () const |
| | Returns the parent object, if one. nullptr if none.
|
| |
|
void | setParent (ObjectBase *p) |
| | Sets the parent of this object. If the object already has a parent, it will be removed as a child from the old parent and added as a child to the new one.
|
| |
| const ObjectBaseList & | childList () const |
| | Returns a list of children of this object.
|
| |
| template<typename... Args> |
| int | registerSlot (Slot< Args... > *slot) |
| | Registers a slot with this object and assigns it an ID.
|
| |
| EventLoop * | eventLoop () const |
| | Returns the EventLoop this object is affiliated with.
|
| |
| void | moveToThread (EventLoop *loop) |
| | Changes the EventLoop affinity of this object.
|
| |
| int | startTimer (unsigned int intervalMs, bool singleShot=false) |
| | Starts a timer on this object's EventLoop.
|
| |
| void | stopTimer (int timerId) |
| | Stops a timer previously started with startTimer().
|
| |
|
template<typename... Args> |
| PROMEKI_NAMESPACE_BEGIN void | connect (Signal< Args... > *signal, Slot< Args... > *slot) |
| |
Manages multicast group membership for multi-stream scenarios.
MulticastManager tracks which sockets have joined which multicast groups, providing centralized management and cleanup. It supports both Any-Source Multicast (ASM) and Source-Specific Multicast (SSM).
- Note
- All managed sockets must remain valid for the lifetime of their memberships. MulticastManager does not take ownership of socket pointers.
- Example
sock.setReuseAddress(
true);
@ ReadWrite
Open for reading and writing.
Definition iodevice.h:37
IPv4 network address.
Definition ipv4address.h:51
Dynamic array container wrapping std::vector.
Definition list.h:40
Manages multicast group membership for multi-stream scenarios.
Definition multicastmanager.h:47
Network address with port number.
Definition socketaddress.h:50
static SocketAddress any(uint16_t port)
Returns INADDR_ANY with the given port.
Definition socketaddress.h:71
Datagram-oriented UDP socket with multicast support.
Definition udpsocket.h:47