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:
parent
6508a082e9
commit
457738f6eb
34 changed files with 333 additions and 934 deletions
|
@ -337,13 +337,14 @@ public:
|
|||
};
|
||||
|
||||
// The server mux, all http server should implements it.
|
||||
class ISrsHttpServeMux
|
||||
class ISrsHttpServeMux : public ISrsHttpHandler
|
||||
{
|
||||
public:
|
||||
ISrsHttpServeMux();
|
||||
virtual ~ISrsHttpServeMux();
|
||||
public:
|
||||
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) = 0;
|
||||
// Register HTTP handler to mux.
|
||||
virtual srs_error_t handle(std::string pattern, ISrsHttpHandler* handler) = 0;
|
||||
};
|
||||
|
||||
// ServeMux is an HTTP request multiplexer.
|
||||
|
@ -413,7 +414,7 @@ private:
|
|||
|
||||
// The filter http mux, directly serve the http CORS requests,
|
||||
// while proxy to the worker mux for services.
|
||||
class SrsHttpCorsMux : public ISrsHttpServeMux
|
||||
class SrsHttpCorsMux : public ISrsHttpHandler
|
||||
{
|
||||
private:
|
||||
bool required;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue