Definition at line 30 of file MulticastClient.h.
◆ anonymous enum
The maximum UDP packet size.
Enumerator |
---|
MaximumUdpPacketSize | 65535 | |
Definition at line 73 of file MulticastClient.h.
◆ MulticastClient()
◆ ~MulticastClient()
◆ drop()
Leaves the multicast group.
◆ join() [1/2]
void join |
( |
const std::string & | ip, |
|
|
int | port ) |
Adds a MulticastClient to the multicast group using all network interfaces.
◆ join() [2/2]
void join |
( |
const std::string & | ip, |
|
|
int | port, |
|
|
const std::string & | networkInterface ) |
Adds a MulticastClient to the multicast group using the given network interface.
◆ receive() [1/2]
const Bytes & receive |
( |
| ) |
|
Receives a multicast packet.
- Note
- Blocks until the packet is received.
-
The multicast group must be joined first.
- Returns
- The received multicast packet.
◆ receive() [2/2]
const Bytes & receive |
( |
long | timeoutInMilliseconds | ) |
|
Receives a multicast packet.
- Note
- Blocks until the packet is received or the timeout period is elapsed.
-
The multicast group must be joined first.
- Returns
- The received multicast packet or an empty vector if the timeout period is elapsed.
◆ send() [1/2]
void send |
( |
const std::string & | packet | ) |
|
Sends the given multicast packet.
◆ send() [2/2]
void send |
( |
const void * | packet, |
|
|
size_t | packetSize ) |
Sends the given multicast packet.