A class used for the exchange of statistics over shared memory.  
 More...
#include <shared_memory.h>
A class used for the exchange of statistics over shared memory. 
      
        
          | IPC::statExchange::statExchange | ( | char * | _data | ) |  | 
      
 
StatExchange constructor, sets the datapointer to the given value. 
 
 
      
        
          | IPC::statExchange::statExchange | ( | char * | _data | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::connector | ( | std::string | name | ) |  | 
      
 
Sets the name of the connector through which this user is viewing. 
 
 
      
        
          | void IPC::statExchange::connector | ( | std::string | name | ) |  | 
      
 
 
      
        
          | std::string IPC::statExchange::connector | ( |  | ) |  | 
      
 
Gets the name of the connector through which this user is viewing. 
 
 
      
        
          | std::string IPC::statExchange::connector | ( |  | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::crc | ( | unsigned int | sum | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::crc | ( | unsigned int | sum | ) |  | 
      
 
 
      
        
          | unsigned int IPC::statExchange::crc | ( |  | ) |  | 
      
 
 
      
        
          | unsigned int IPC::statExchange::crc | ( |  | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::down | ( | long long int | bytes | ) |  | 
      
 
Sets the amount of bytes received. 
 
 
      
        
          | void IPC::statExchange::down | ( | long long int | bytes | ) |  | 
      
 
 
      
        
          | long long int IPC::statExchange::down | ( |  | ) |  | 
      
 
Gets the amount of bytes received. 
 
 
      
        
          | long long int IPC::statExchange::down | ( |  | ) |  | 
      
 
 
      
        
          | char IPC::statExchange::getSync | ( |  | ) |  | 
      
 
 
      
        
          | char IPC::statExchange::getSync | ( |  | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::host | ( | std::string | name | ) |  | 
      
 
Sets the host of this connection. 
 
 
      
        
          | void IPC::statExchange::host | ( | std::string | name | ) |  | 
      
 
 
      
        
          | std::string IPC::statExchange::host | ( |  | ) |  | 
      
 
 
      
        
          | std::string IPC::statExchange::host | ( |  | ) |  | 
      
 
Gets the host of this connection. 
 
 
      
        
          | void IPC::statExchange::lastSecond | ( | long | time | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::lastSecond | ( | long | time | ) |  | 
      
 
Sets the last viewing second of this user. 
 
 
      
        
          | long IPC::statExchange::lastSecond | ( |  | ) |  | 
      
 
 
      
        
          | long IPC::statExchange::lastSecond | ( |  | ) |  | 
      
 
Gets the last viewing second of this user. 
 
 
      
        
          | void IPC::statExchange::now | ( | long long int | time | ) |  | 
      
 
Sets timestamp of the current stats. 
 
 
      
        
          | void IPC::statExchange::now | ( | long long int | time | ) |  | 
      
 
 
      
        
          | long long int IPC::statExchange::now | ( |  | ) |  | 
      
 
Gets timestamp of the current stats. 
 
 
      
        
          | long long int IPC::statExchange::now | ( |  | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::setSync | ( | char | s | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::setSync | ( | char | s | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::streamName | ( | std::string | name | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::streamName | ( | std::string | name | ) |  | 
      
 
Sets the name of the stream this user is viewing. 
 
 
      
        
          | std::string IPC::statExchange::streamName | ( |  | ) |  | 
      
 
 
      
        
          | std::string IPC::statExchange::streamName | ( |  | ) |  | 
      
 
Gets the name of the stream this user is viewing. 
 
 
      
        
          | void IPC::statExchange::time | ( | long | time | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::time | ( | long | time | ) |  | 
      
 
Sets time currently connected. 
 
 
      
        
          | long IPC::statExchange::time | ( |  | ) |  | 
      
 
 
      
        
          | long IPC::statExchange::time | ( |  | ) |  | 
      
 
Gets time currently connected. 
 
 
      
        
          | void IPC::statExchange::up | ( | long long int | bytes | ) |  | 
      
 
 
      
        
          | void IPC::statExchange::up | ( | long long int | bytes | ) |  | 
      
 
Sets the amount of bytes sent. 
 
 
      
        
          | long long int IPC::statExchange::up | ( |  | ) |  | 
      
 
 
      
        
          | long long int IPC::statExchange::up | ( |  | ) |  | 
      
 
Gets the amount of bytes sent. 
 
 
  
  | 
        
          | char * IPC::statExchange::data |  | private | 
 
The payload for the stat exchange. 
- 8 byte - now (timestamp of last statistics)
- 4 byte - time (duration of the current connection)
- 4 byte - lastSecond (last second of content viewed)
- 8 byte - down (Number of bytes received from peer)
- 8 byte - up (Number of bytes sent to peer)
- 16 byte - host (ip address of the peer)
- 100 byte - streamName (name of the stream peer is viewing)
- 20 byte - connector (name of the connector the peer is using)
- 4 byte - CRC32 of user agent (or zero if none)
- 1 byte sync (was seen by controller yes/no)
- (implicit 2 bytes: PID) 
 
 
The documentation for this class was generated from the following files: