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

cleanup connections when terminate server.

This commit is contained in:
winlin 2015-06-08 14:03:16 +08:00
parent 573495a19f
commit d7e5df2578
6 changed files with 48 additions and 31 deletions

View file

@ -83,10 +83,19 @@ protected:
* the ip of client.
*/
std::string ip;
/**
* whether the connection is disposed,
* when disposed, connection should stop cycle and cleanup itself.
*/;
bool disposed;
public:
SrsConnection(IConnectionManager* cm, st_netfd_t c);
virtual ~SrsConnection();
public:
/**
* to dipose the connection.
*/
virtual void dispose();
/**
* start the client green thread.
* when server get a client from listener,