#include <CAVERNnet_mcast_c.hxx>
Inheritance diagram for CAVERNnet_mcast_c::
Public Methods | |
CAVERNnet_mcast_c () | |
void | close () |
Close the connection. | |
int | init (char *mcastGroup, int port, int mttl=CAVERNnet_mcast_c::maxTTL) |
Open a connection to the multicast IP address. | |
int | send (char *, int) |
Broadcast a message to the group. | |
int | receive (char *, int) |
Receive a message from the group. | |
void | printInfo () |
Print info on the current mcast connection. | |
void | makeNonBlocking () |
Tell mcast to use non-blocking data transfer. | |
unsigned long | getReceiveIP () |
Get the IP address of the last message received. | |
void | getReceiveIP (char *clientIP) |
Same thing except it returns a string */. | |
void | enableInstrumentation () |
void | disableInstrumentation () |
unsigned long | getSelfIP () |
Get your own IP. | |
void | getSelfIP (char *ip) |
Get your own IP. | |
unsigned long | getSendIP () |
Get outgoing packet's destination address. | |
void | getSendIP (char *ip) |
Get outgoing packet's destination address. | |
unsigned short | getSelfPort () |
Get your own port. | |
unsigned short | getSendPort () |
Get outgoing port. | |
unsigned short | getReceivePort () |
Get incoming port. | |
Static Public Attributes | |
const int | maxTTL |
const int | OK |
Status ok. | |
const int | FAILED |
Status failed. | |
Private Attributes | |
int | enableInstr |
int | sockfd |
struct sockaddr_in receiveAddress | sendAddress |
struct ip_mreq | mreq |
char | ttl |
|
Disable the logging of latency and inter-message delay. Note: in order for this to work, all clients that subscribe to the same multicast address must also disable their instrumentation or else the bit stream will become confused. By default instrumentation is disabled except for Bandwith measurements. |
|
Enable the logging of latency and inter-message delay. Note: in order for this to work, all clients that subscribe to the same multicast address must also enable their instrumentation or else the bit stream will become confused. Enabling logging prepends timestamp data that is used to compute latency. By default instrumentation is disabled except for Bandwidth measurements. |