1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #316, http api provides stream/vhost/srs/server bytes, codec and count. 2.0.136

This commit is contained in:
winlin 2015-03-08 19:59:10 +08:00
parent 2e9f2753c9
commit 5143e3a58d
17 changed files with 191 additions and 57 deletions

View file

@ -51,6 +51,10 @@ private:
* when thread stop, the connection will be delete by server.
*/
SrsThread* pthread;
/**
* the id of connection.
*/
int id;
protected:
/**
* the server object to manage the connection.
@ -92,14 +96,9 @@ public:
virtual void on_thread_stop();
public:
/**
* reset and start sample of bytes.
* when server to get the kbps of connection,
* it cannot wait the connection terminated then get the kbps,
* it must sample the kbps every some interval, for instance, 9s to sample all connections kbps,
* all connections will extends from IKbpsDelta which provides the bytes delta,
* while the delta must be update by the sample which invoke by the kbps_resample().
* get the srs id which identify the client.
*/
virtual void kbps_resample() = 0;
virtual int srs_id();
protected:
/**
* for concrete connection to do the cycle.