mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support http heartbeat, 0.9.107
This commit is contained in:
parent
cb95b5909c
commit
ef0f7f4da8
14 changed files with 459 additions and 185 deletions
|
@ -39,32 +39,6 @@ class SrsRequest;
|
|||
class SrsHttpParser;
|
||||
class SrsFlvSegment;
|
||||
|
||||
#include <srs_app_st.hpp>
|
||||
|
||||
/**
|
||||
* http client to GET/POST/PUT/DELETE uri
|
||||
*/
|
||||
class SrsHttpClient
|
||||
{
|
||||
private:
|
||||
bool connected;
|
||||
st_netfd_t stfd;
|
||||
SrsHttpParser* parser;
|
||||
public:
|
||||
SrsHttpClient();
|
||||
virtual ~SrsHttpClient();
|
||||
public:
|
||||
/**
|
||||
* to post data to the uri.
|
||||
* @param req the data post to uri.
|
||||
* @param res the response data from server.
|
||||
*/
|
||||
virtual int post(SrsHttpUri* uri, std::string req, std::string& res);
|
||||
private:
|
||||
virtual void disconnect();
|
||||
virtual int connect(SrsHttpUri* uri);
|
||||
};
|
||||
|
||||
/**
|
||||
* the http hooks, http callback api,
|
||||
* for some event, such as on_connect, call
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue