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

For #913, use complex error for http

This commit is contained in:
winlin 2017-07-29 21:39:57 +08:00
parent 661eb8b37c
commit 9f5224c34a
24 changed files with 388 additions and 453 deletions

View file

@ -44,7 +44,7 @@ public:
SrsGoApiRoot();
virtual ~SrsGoApiRoot();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiApi : public ISrsHttpHandler
@ -53,7 +53,7 @@ public:
SrsGoApiApi();
virtual ~SrsGoApiApi();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiV1 : public ISrsHttpHandler
@ -62,7 +62,7 @@ public:
SrsGoApiV1();
virtual ~SrsGoApiV1();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiVersion : public ISrsHttpHandler
@ -71,7 +71,7 @@ public:
SrsGoApiVersion();
virtual ~SrsGoApiVersion();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiSummaries : public ISrsHttpHandler
@ -80,7 +80,7 @@ public:
SrsGoApiSummaries();
virtual ~SrsGoApiSummaries();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiRusages : public ISrsHttpHandler
@ -89,7 +89,7 @@ public:
SrsGoApiRusages();
virtual ~SrsGoApiRusages();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiSelfProcStats : public ISrsHttpHandler
@ -98,7 +98,7 @@ public:
SrsGoApiSelfProcStats();
virtual ~SrsGoApiSelfProcStats();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiSystemProcStats : public ISrsHttpHandler
@ -107,7 +107,7 @@ public:
SrsGoApiSystemProcStats();
virtual ~SrsGoApiSystemProcStats();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiMemInfos : public ISrsHttpHandler
@ -116,7 +116,7 @@ public:
SrsGoApiMemInfos();
virtual ~SrsGoApiMemInfos();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiAuthors : public ISrsHttpHandler
@ -125,7 +125,7 @@ public:
SrsGoApiAuthors();
virtual ~SrsGoApiAuthors();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiFeatures : public ISrsHttpHandler
@ -134,7 +134,7 @@ public:
SrsGoApiFeatures();
virtual ~SrsGoApiFeatures();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiRequests : public ISrsHttpHandler
@ -143,7 +143,7 @@ public:
SrsGoApiRequests();
virtual ~SrsGoApiRequests();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiVhosts : public ISrsHttpHandler
@ -152,7 +152,7 @@ public:
SrsGoApiVhosts();
virtual ~SrsGoApiVhosts();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiStreams : public ISrsHttpHandler
@ -161,7 +161,7 @@ public:
SrsGoApiStreams();
virtual ~SrsGoApiStreams();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiClients : public ISrsHttpHandler
@ -170,7 +170,7 @@ public:
SrsGoApiClients();
virtual ~SrsGoApiClients();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsGoApiRaw : virtual public ISrsHttpHandler, virtual public ISrsReloadHandler
@ -186,7 +186,7 @@ public:
SrsGoApiRaw(SrsServer* svr);
virtual ~SrsGoApiRaw();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
// interface ISrsReloadHandler
public:
virtual int on_reload_http_api_raw_api();
@ -198,7 +198,7 @@ public:
SrsGoApiError();
virtual ~SrsGoApiError();
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
class SrsHttpApi : virtual public SrsConnection, virtual public ISrsReloadHandler
@ -217,12 +217,12 @@ public:
virtual int64_t get_recv_bytes_delta();
virtual void cleanup();
protected:
virtual int do_cycle();
virtual srs_error_t do_cycle();
private:
virtual int process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
// interface ISrsReloadHandler
public:
virtual int on_reload_http_api_crossdomain();
virtual srs_error_t on_reload_http_api_crossdomain();
};
#endif