class CAVERNnet_socketbase_c

A base level socket class subclassed by CAVERNnet_tcp_c, CAVERNnet_udp_c, CAVERNnet_mcast_c, CAVERNnet_parallelTcp_c, and CAVERNnet_perfMonitor_c

Inheritance:


Public Methods

static int hostnameToIP (char *hostname, char* hostIP)
Convert a hostname to an ip address of xxx.xxx.xxx.xxx
static void ipNumToString (unsigned int ip, char *ipstring)
Convert ip address to a string of xxx.xxx.xxx.xxx
static double getTimeInSecs ()
Get time in secs with microsecond accuracy
static void getHostName (char *name, int len)
Get the full host name of a local client
static void expandHostName (char *src, char *newname, int len)
If hostname is not fully expanded (ie does not include its domain) then expand it.
unsigned int getTotalDataSent ()
Get the total data sent by a connection.
unsigned int getTotalDataRead ()
Get total data received by a connection.
double getInstantReceiveBandwidth ()
Get total instantaneous incoming bandwidth by a connection.
double getInstantSendBandwidth ()
Get total instantaneous outgoing bandwidth by a connection.
double getAverageReceiveBandwidth ()
Get average incoming bandwidth by a connection.
double getAverageSendBandwidth ()
Get average outgoing bandwidth by a connection.
void setInstantLatency (double lat)
Set the instantaneous latency and also calculate the STALatency and Jitter values automatically
double getInstantLatency ()
Retrieve most recent incoming packet's latency.
double getAverageLatency ()
Retrieve average incoming latency.
double getMaxLatency ()
Retrieve max latency so far.
double getMinLatency ()
Retrieve min latency so far.
void incrementDataSent (unsigned long size)
Record amount of data sent.
void incrementDataRead (unsigned long size)
Record amount of data read - and also compute instantaneous, average bandwidths along with the inter message delay values
double getInstantInterMesgDelay ()
Get instantaneous inter-message delay (jitter)
double getMaxInterMesgDelay ()
Get max inter-message delay (jitter)
double getMinInterMesgDelay ()
Get min inter-message delay (jitter)
double getAverageInterMesgDelay ()
Get average inter-message delay (jitter)
double getSTABandwidth ()
Get the Short Term Average Bandwidth -over a fixed number of packets (defined by BANDWIDTH_BUF_SIZE)
double getSTALatency ()
Get the Short Term Average Latency -over a number of packets (defined by LATENCY_BUF_SIZE)
double getBurstiness ()
get the burstinesss
double getJitter ()
Get the Jitter
unsigned long getPacketsRead ()
Return the total number of packets read
unsigned long getPacketsSent ()
Return the total number of packets sent
virtual int getSocketId ()
Returns the socket id
int selectSock (void *ptr, int *status, int numSocks, struct timeval *timeout)
Returns the status of the sockets being polled

Public


Socketbase class return values
static const int OK
Operation went ok
static const int FAILED
Operation failed
static const int TIMED_OUT
Operation timed out

Protected Methods

void computeInstantSendBandwidth ()
Calculate the instantaneous outgoing bandwidth
void computeInstantReceiveBandwidth ()
Calculate the instantaneous incoming bandwidth
void computeAverageReceiveBandwidth ()
Calculate the average incoming bandwidth
void computeAverageSendBandwidth ()
Calculate the average outgoing bandwidth
void calculateJitter (double lat)
Calculate the jitter over a specified number of packets
void calculateBurstiness (double bw)
Calculate the burstiness over a specified number of packets

Documentation

A base level socket class subclassed by CAVERNnet_tcp_c, CAVERNnet_udp_c, CAVERNnet_mcast_c, CAVERNnet_parallelTcp_c, and CAVERNnet_perfMonitor_c. The class itself does no networking. It provides some common member functions that are useful for network coding. In general one does not create an instance of this type.

This class also offers information about the bandwidth, latency, Inter-Message_delay, Jitter and Burstiness values associated with the individual socket connections. Latency and Jitter calculations are offered only if the individual subclasses have implemented and enabled it. Otherwise values will be zero. These calculations are used by the CAVERNnet_perfMonitor_c class


Direct child classes:
CAVERNnet_udp_c
CAVERNnet_udpReflector_c
CAVERNnet_tcpServer_c
CAVERNnet_tcpClient_c
CAVERNnet_perfMonitor_c
CAVERNnet_parallelTcpServer_c
CAVERNnet_parallelTcpClient_c
CAVERNnet_mcast_c

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de