MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Public Member Functions | Private Attributes
Controller::statSession Class Reference

A session class that keeps track of both current and archived connections. More...

#include <controller_statistics.h>

Public Member Functions

 statSession ()
 Constructs an empty session. More...
 
void finish (unsigned long index)
 Archives the given connection. More...
 
long long getBpsDown (unsigned long long time)
 Returns the cumulative downloaded bytes per second for this session at timestamp t. More...
 
long long getBpsDown (unsigned long long start, unsigned long long end)
 
long long getBpsUp (unsigned long long time)
 Returns the cumulative uploaded bytes per second for this session at timestamp t. More...
 
long long getBpsUp (unsigned long long start, unsigned long long end)
 
long long getConnTime (unsigned long long time)
 Returns the cumulative connected time for this session at timestamp t. More...
 
long long getDown (unsigned long long time)
 Returns the cumulative downloaded bytes for this session at timestamp t. More...
 
unsigned long long getEnd ()
 Returns the last measured timestamp in this session. More...
 
long long getLastSecond (unsigned long long time)
 Returns the last requested media timestamp for this session at timestamp t. More...
 
unsigned long long getStart ()
 Returns the first measured timestamp in this session. More...
 
long long getUp (unsigned long long time)
 Returns the cumulative uploaded bytes for this session at timestamp t. More...
 
bool hasData ()
 Returns true if there is any data for this session. More...
 
bool hasDataFor (unsigned long long time)
 Returns true if there is data for this session at timestamp t. More...
 
void switchOverTo (statSession &newSess, unsigned long index)
 Moves the given connection to the given session. More...
 
void update (unsigned long index, IPC::statExchange &data)
 Updates the given active connection with new stats data. More...
 
void wipeOld (unsigned long long)
 Archives the given connection. More...
 

Private Attributes

std::map< unsigned long, statStoragecurConns
 
unsigned long long firstSec
 
unsigned long long lastSec
 
std::deque< statStorageoldConns
 
char sync
 

Detailed Description

A session class that keeps track of both current and archived connections.

Allows for moving of connections to another session.

Constructor & Destructor Documentation

Controller::statSession::statSession ( )

Constructs an empty session.

Member Function Documentation

void Controller::statSession::finish ( unsigned long  index)

Archives the given connection.

long long Controller::statSession::getBpsDown ( unsigned long long  time)

Returns the cumulative downloaded bytes per second for this session at timestamp t.

long long Controller::statSession::getBpsDown ( unsigned long long  start,
unsigned long long  end 
)
long long Controller::statSession::getBpsUp ( unsigned long long  time)

Returns the cumulative uploaded bytes per second for this session at timestamp t.

long long Controller::statSession::getBpsUp ( unsigned long long  start,
unsigned long long  end 
)
long long Controller::statSession::getConnTime ( unsigned long long  time)

Returns the cumulative connected time for this session at timestamp t.

long long Controller::statSession::getDown ( unsigned long long  time)

Returns the cumulative downloaded bytes for this session at timestamp t.

unsigned long long Controller::statSession::getEnd ( )

Returns the last measured timestamp in this session.

long long Controller::statSession::getLastSecond ( unsigned long long  time)

Returns the last requested media timestamp for this session at timestamp t.

unsigned long long Controller::statSession::getStart ( )

Returns the first measured timestamp in this session.

long long Controller::statSession::getUp ( unsigned long long  time)

Returns the cumulative uploaded bytes for this session at timestamp t.

bool Controller::statSession::hasData ( )

Returns true if there is any data for this session.

bool Controller::statSession::hasDataFor ( unsigned long long  time)

Returns true if there is data for this session at timestamp t.

void Controller::statSession::switchOverTo ( statSession newSess,
unsigned long  index 
)

Moves the given connection to the given session.

void Controller::statSession::update ( unsigned long  index,
IPC::statExchange data 
)

Updates the given active connection with new stats data.

void Controller::statSession::wipeOld ( unsigned long long  cutOff)

Archives the given connection.

Field Documentation

std::map<unsigned long, statStorage> Controller::statSession::curConns
private
unsigned long long Controller::statSession::firstSec
private
unsigned long long Controller::statSession::lastSec
private
std::deque<statStorage> Controller::statSession::oldConns
private
char Controller::statSession::sync
private

The documentation for this class was generated from the following files: