diff --git a/trunk/src/app/srs_app_caster_flv.hpp b/trunk/src/app/srs_app_caster_flv.hpp index 4123eb1ef..226b7deca 100644 --- a/trunk/src/app/srs_app_caster_flv.hpp +++ b/trunk/src/app/srs_app_caster_flv.hpp @@ -72,7 +72,7 @@ public: }; // The dynamic http connection, never drop the body. -class SrsDynamicHttpConn : virtual public ISrsStartableConneciton, virtual public ISrsHttpMessageHandler +class SrsDynamicHttpConn : virtual public ISrsStartableConneciton, virtual public ISrsHttpConnOwner { private: // The manager object to manage the connection. @@ -93,7 +93,7 @@ public: private: virtual srs_error_t do_proxy(ISrsHttpResponseReader* rr, SrsFlvDecoder* dec); // Extract APIs from SrsTcpConnection. -// Interface ISrsHttpMessageHandler. +// Interface ISrsHttpConnOwner. public: virtual srs_error_t on_http_message(ISrsHttpMessage* msg); virtual void on_conn_done(); diff --git a/trunk/src/app/srs_app_http_conn.cpp b/trunk/src/app/srs_app_http_conn.cpp index 27f1e6853..594dd00d7 100644 --- a/trunk/src/app/srs_app_http_conn.cpp +++ b/trunk/src/app/srs_app_http_conn.cpp @@ -59,15 +59,15 @@ using namespace std; #include #include -ISrsHttpMessageHandler::ISrsHttpMessageHandler() +ISrsHttpConnOwner::ISrsHttpConnOwner() { } -ISrsHttpMessageHandler::~ISrsHttpMessageHandler() +ISrsHttpConnOwner::~ISrsHttpConnOwner() { } -SrsHttpConn::SrsHttpConn(ISrsHttpMessageHandler* handler, srs_netfd_t fd, ISrsHttpServeMux* m, string cip, int cport) +SrsHttpConn::SrsHttpConn(ISrsHttpConnOwner* handler, srs_netfd_t fd, ISrsHttpServeMux* m, string cip, int cport) { parser = new SrsHttpParser(); cors = new SrsHttpCorsMux(); @@ -184,7 +184,7 @@ srs_error_t SrsHttpConn::do_cycle() return err; } -ISrsHttpMessageHandler* SrsHttpConn::handler() +ISrsHttpConnOwner* SrsHttpConn::handler() { return handler_; } diff --git a/trunk/src/app/srs_app_http_conn.hpp b/trunk/src/app/srs_app_http_conn.hpp index af9229559..497e0d817 100644 --- a/trunk/src/app/srs_app_http_conn.hpp +++ b/trunk/src/app/srs_app_http_conn.hpp @@ -54,12 +54,12 @@ class SrsHttpMessage; class SrsHttpStreamServer; class SrsHttpStaticServer; -// The handler for HTTP message. -class ISrsHttpMessageHandler +// The owner of HTTP connection. +class ISrsHttpConnOwner { public: - ISrsHttpMessageHandler(); - virtual ~ISrsHttpMessageHandler(); + ISrsHttpConnOwner(); + virtual ~ISrsHttpConnOwner(); public: // Handle the HTTP message msg, which may be parsed partially. // For the static service or api, discard any body. @@ -77,7 +77,7 @@ protected: SrsHttpParser* parser; ISrsHttpServeMux* http_mux; SrsHttpCorsMux* cors; - ISrsHttpMessageHandler* handler_; + ISrsHttpConnOwner* handler_; protected: SrsTcpConnection* skt; // Each connection start a green thread, @@ -97,7 +97,7 @@ private: // for current connection to log self create time and calculate the living time. int64_t create_time; public: - SrsHttpConn(ISrsHttpMessageHandler* handler, srs_netfd_t fd, ISrsHttpServeMux* m, std::string cip, int port); + SrsHttpConn(ISrsHttpConnOwner* handler, srs_netfd_t fd, ISrsHttpServeMux* m, std::string cip, int port); virtual ~SrsHttpConn(); // Interface ISrsResource. public: @@ -109,7 +109,7 @@ private: virtual srs_error_t do_cycle(); public: // Get the HTTP message handler. - virtual ISrsHttpMessageHandler* handler(); + virtual ISrsHttpConnOwner* handler(); // Whether the connection coroutine is error or terminated. virtual srs_error_t pull(); private: @@ -143,7 +143,7 @@ public: }; // Drop body of request, only process the response. -class SrsResponseOnlyHttpConn : virtual public ISrsStartableConneciton, virtual public ISrsHttpMessageHandler +class SrsResponseOnlyHttpConn : virtual public ISrsStartableConneciton, virtual public ISrsHttpConnOwner { private: // The manager object to manage the connection. @@ -160,7 +160,7 @@ 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 ISrsHttpMessageHandler. +// Interface ISrsHttpConnOwner. public: virtual srs_error_t on_http_message(ISrsHttpMessage* msg); virtual void on_conn_done();