Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CAVERNnet_mcast_c Class Reference

#include <CAVERNnet_mcast_c.hxx>

Inheritance diagram for CAVERNnet_mcast_c::

CAVERNnet_socketbase_c List of all members.

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

Detailed Description

Multicast Class. This class bypasses CAVERN's standard method for establishing connections and provides the user with direct control of multicast connections.


Member Function Documentation

void CAVERNnet_mcast_c::disableInstrumentation ( )
 

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.

void CAVERNnet_mcast_c::enableInstrumentation ( )
 

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.


The documentation for this class was generated from the following file:
Generated at Mon Jul 2 14:24:43 2001 for CAVERNsoft by doxygen1.2.8-20010617 written by Dimitri van Heesch, © 1997-2001