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

Merge SRS2

This commit is contained in:
winlin 2017-05-01 16:44:14 +08:00
commit f97260be1d
8 changed files with 119 additions and 2 deletions

View file

@ -39,6 +39,8 @@ class SrsRtmpConn;
class SrsSource;
class SrsRequest;
class SrsConsumer;
class SrsHttpConn;
class SrsResponseOnlyHttpConn;
/**
* The message consumer which consume a message.
@ -221,5 +223,29 @@ private:
virtual void set_socket_buffer(int sleep_ms);
};
/**
* The HTTP receive thread, try to read messages util EOF.
* For example, the HTTP FLV serving thread will use the receive thread to break
* when client closed the request, to avoid FD leak.
* @see https://github.com/ossrs/srs/issues/636#issuecomment-298208427
*/
class SrsHttpRecvThread : public ISrsOneCycleThreadHandler
{
private:
SrsResponseOnlyHttpConn* conn;
SrsOneCycleThread* trd;
int error;
public:
SrsHttpRecvThread(SrsResponseOnlyHttpConn* c);
virtual ~SrsHttpRecvThread();
public:
virtual int start();
public:
virtual int error_code();
// interface ISrsOneCycleThreadHandler
public:
virtual int cycle();
};
#endif