NetInterfaceTrafficStats Class Reference

#include <NetInterface.hh>


Public Member Functions

 NetInterfaceTrafficStats ()
void countPacket (unsigned packetSize)
float totNumPackets () const
float totNumBytes () const
Boolean haveSeenTraffic () const

Private Attributes

float fTotNumPackets
float fTotNumBytes


Detailed Description

Definition at line 134 of file NetInterface.hh.


Constructor & Destructor Documentation

NetInterfaceTrafficStats::NetInterfaceTrafficStats (  ) 

Definition at line 151 of file NetInterface.cpp.

References fTotNumBytes, and fTotNumPackets.

00151                                                    {
00152   fTotNumPackets = fTotNumBytes = 0.0;
00153 }


Member Function Documentation

void NetInterfaceTrafficStats::countPacket ( unsigned  packetSize  ) 

Definition at line 155 of file NetInterface.cpp.

References fTotNumBytes, and fTotNumPackets.

Referenced by Groupsock::handleRead(), and Groupsock::output().

00155                                                               {
00156   fTotNumPackets += 1.0;
00157   fTotNumBytes += packetSize;
00158 }

float NetInterfaceTrafficStats::totNumPackets (  )  const [inline]

Definition at line 140 of file NetInterface.hh.

References fTotNumPackets.

00140 {return fTotNumPackets;}

float NetInterfaceTrafficStats::totNumBytes (  )  const [inline]

Definition at line 141 of file NetInterface.hh.

References fTotNumBytes.

00141 {return fTotNumBytes;}

Boolean NetInterfaceTrafficStats::haveSeenTraffic (  )  const

Definition at line 160 of file NetInterface.cpp.

References fTotNumPackets.

00160                                                         {
00161   return fTotNumPackets != 0.0;
00162 }


Field Documentation

float NetInterfaceTrafficStats::fTotNumPackets [private]

Definition at line 146 of file NetInterface.hh.

Referenced by countPacket(), haveSeenTraffic(), NetInterfaceTrafficStats(), and totNumPackets().

float NetInterfaceTrafficStats::fTotNumBytes [private]

Definition at line 147 of file NetInterface.hh.

Referenced by countPacket(), NetInterfaceTrafficStats(), and totNumBytes().


The documentation for this class was generated from the following files:
Generated on Tue Jul 22 06:41:00 2008 for live by  doxygen 1.5.2