mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine http for srs, rename SrsGoHttp to SrsHttp.
This commit is contained in:
parent
983ab8fb89
commit
04dc60ebe1
8 changed files with 197 additions and 197 deletions
|
@ -48,7 +48,7 @@ SrsGoApiRoot::~SrsGoApiRoot()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiRoot::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiRoot::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -70,7 +70,7 @@ SrsGoApiApi::~SrsGoApiApi()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiApi::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiApi::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -92,7 +92,7 @@ SrsGoApiV1::~SrsGoApiV1()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiV1::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiV1::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -123,7 +123,7 @@ SrsGoApiVersion::~SrsGoApiVersion()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiVersion::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiVersion::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -148,7 +148,7 @@ SrsGoApiSummaries::~SrsGoApiSummaries()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiSummaries::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiSummaries::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
srs_api_dump_summaries(ss);
|
||||
|
@ -163,7 +163,7 @@ SrsGoApiRusages::~SrsGoApiRusages()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiRusages::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* req)
|
||||
int SrsGoApiRusages::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* req)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -204,7 +204,7 @@ SrsGoApiSelfProcStats::~SrsGoApiSelfProcStats()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiSelfProcStats::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiSelfProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -274,7 +274,7 @@ SrsGoApiSystemProcStats::~SrsGoApiSystemProcStats()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiSystemProcStats::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiSystemProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -309,7 +309,7 @@ SrsGoApiMemInfos::~SrsGoApiMemInfos()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiMemInfos::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiMemInfos::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -345,7 +345,7 @@ SrsGoApiAuthors::~SrsGoApiAuthors()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiAuthors::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiAuthors::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
@ -370,7 +370,7 @@ SrsGoApiRequests::~SrsGoApiRequests()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiRequests::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiRequests::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
SrsHttpMessage* req = r;
|
||||
|
||||
|
@ -431,7 +431,7 @@ SrsGoApiVhosts::~SrsGoApiVhosts()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiVhosts::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiVhosts::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream data;
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
|
@ -456,7 +456,7 @@ SrsGoApiStreams::~SrsGoApiStreams()
|
|||
{
|
||||
}
|
||||
|
||||
int SrsGoApiStreams::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsGoApiStreams::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
std::stringstream data;
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
|
@ -473,7 +473,7 @@ int SrsGoApiStreams::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
|||
return srs_go_http_response_json(w, ss.str());
|
||||
}
|
||||
|
||||
SrsHttpApi::SrsHttpApi(SrsServer* svr, st_netfd_t fd, SrsGoHttpServeMux* m)
|
||||
SrsHttpApi::SrsHttpApi(SrsServer* svr, st_netfd_t fd, SrsHttpServeMux* m)
|
||||
: SrsConnection(svr, fd)
|
||||
{
|
||||
mux = m;
|
||||
|
@ -535,7 +535,7 @@ int SrsHttpApi::do_cycle()
|
|||
SrsAutoFree(SrsHttpMessage, req);
|
||||
|
||||
// ok, handle http request.
|
||||
SrsGoHttpResponseWriter writer(&skt);
|
||||
SrsHttpResponseWriter writer(&skt);
|
||||
if ((ret = process_request(&writer, req)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -544,7 +544,7 @@ int SrsHttpApi::do_cycle()
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsHttpApi::process_request(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
int SrsHttpApi::process_request(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue