MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Data Structures | Namespaces | Macros | Functions | Variables
controller_statistics.h File Reference
#include <mist/shared_memory.h>
#include <mist/timing.h>
#include <mist/defines.h>
#include <mist/json.h>
#include <mist/tinythread.h>
#include <string>
#include <map>

Go to the source code of this file.

Data Structures

class  Controller::sessIndex
 This is a comparison and storage class that keeps sessions apart from each other. More...
 
struct  Controller::statLog
 
class  Controller::statSession
 A session class that keeps track of both current and archived connections. More...
 
class  Controller::statStorage
 

Namespaces

 Controller
 Holds everything unique to the controller.
 

Macros

#define STAT_CUTOFF   600
 The STAT_CUTOFF define sets how many seconds of statistics history is kept. More...
 

Functions

void Controller::fillActive (JSON::Value &req, JSON::Value &rep, bool onlyNow=false)
 This takes a "active_streams" request, and fills in the response data. More...
 
void Controller::fillClients (JSON::Value &req, JSON::Value &rep)
 This takes a "clients" request, and fills in the response data. More...
 
void Controller::fillTotals (JSON::Value &req, JSON::Value &rep)
 This takes a "totals" request, and fills in the response data. More...
 
bool Controller::hasViewers (std::string streamName)
 Returns true if this stream has at least one connected client. More...
 
void Controller::killStatistics (char *data, size_t len, unsigned int id)
 Forces a disconnect to all users. More...
 
void Controller::parseStatistics (char *data, size_t len, unsigned int id)
 This function is called by the shared memory page that holds statistics. More...
 
void Controller::SharedMemStats (void *config)
 This function runs as a thread and roughly once per second retrieves statistics from all connected clients, as well as wipes old statistics that have disconnected over 10 minutes ago. More...
 

Variables

std::map< unsigned long, sessIndex > Controller::connToSession
 Map of socket IDs to session info. More...
 
bool Controller::killOnExit = KILL_ON_EXIT
 
std::map< sessIndex, statSession > Controller::sessions
 list of sessions that have statistics data available More...
 
tthread::mutex Controller::statsMutex
 

Macro Definition Documentation

#define STAT_CUTOFF   600

The STAT_CUTOFF define sets how many seconds of statistics history is kept.