Class UdpMulticastSocket
Defined in File socket.h
Class Documentation
-
class UdpMulticastSocket
Allows to retrieve data from a UDP multicast group.
Public Functions
Creates a socket and joins the multicast group with the given address.
-
~UdpMulticastSocket()
-
int recv()
Retrieve data from multicast group.
This call is non-blocking.
- Returns:
The number of bytes received or -1 if no data is available
-
inline const char *getBuffer()
Returns a pointer to the internal buffer, holding the received data.
The buffer size may be obtained from MAXRECV.
-
int send(const char *buf, unsigned int sz, int port)
Public Static Attributes
-
static const int MAXRECV = 3000
Maximum number of bytse that can be read at a time.