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

Fix #2881: HTTP: Support merging api to server. v5.0.47

This commit is contained in:
winlin 2022-08-28 09:10:13 +08:00
parent 6508a082e9
commit 457738f6eb
34 changed files with 333 additions and 934 deletions

View file

@ -127,7 +127,7 @@ public:
};
// Drop body of request, only process the response.
class SrsResponseOnlyHttpConn : public ISrsStartableConneciton, public ISrsHttpConnOwner
class SrsHttpxConn : public ISrsStartableConneciton, public ISrsHttpConnOwner
, public ISrsReloadHandler
{
private:
@ -137,8 +137,8 @@ private:
SrsSslConnection* ssl;
SrsHttpConn* conn;
public:
SrsResponseOnlyHttpConn(bool https, ISrsResourceManager* cm, srs_netfd_t fd, ISrsHttpServeMux* m, std::string cip, int port);
virtual ~SrsResponseOnlyHttpConn();
SrsHttpxConn(bool https, ISrsResourceManager* cm, srs_netfd_t fd, ISrsHttpServeMux* m, std::string cip, int port);
virtual ~SrsHttpxConn();
public:
// Directly read a HTTP request message.
// It's exported for HTTP stream, such as HTTP FLV, only need to write to client when
@ -146,9 +146,6 @@ public:
// @see https://github.com/ossrs/srs/issues/636#issuecomment-298208427
// @remark Should only used in HTTP-FLV streaming connection.
virtual srs_error_t pop_message(ISrsHttpMessage** preq);
// Interface ISrsReloadHandler
public:
virtual srs_error_t on_reload_http_stream_crossdomain();
// Interface ISrsHttpConnOwner.
public:
virtual srs_error_t on_start();
@ -189,6 +186,9 @@ public:
public:
virtual srs_error_t initialize();
// Interface ISrsHttpServeMux
public:
virtual srs_error_t handle(std::string pattern, ISrsHttpHandler* handler);
// Interface ISrsHttpHandler
public:
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
public: