mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine hls notify, support timeout.
This commit is contained in:
parent
d8988da0ea
commit
1f93fb3399
4 changed files with 19 additions and 10 deletions
|
@ -40,6 +40,9 @@ class SrsHttpParser;
|
|||
class SrsHttpMessage;
|
||||
class SrsStSocket;
|
||||
|
||||
// the default timeout for http client.
|
||||
#define SRS_HTTP_CLIENT_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
||||
|
||||
/**
|
||||
* http client to GET/POST/PUT/DELETE uri
|
||||
*/
|
||||
|
@ -51,6 +54,7 @@ private:
|
|||
SrsStSocket* skt;
|
||||
SrsHttpParser* parser;
|
||||
private:
|
||||
int64_t timeout_us;
|
||||
// host name or ip.
|
||||
std::string host;
|
||||
int port;
|
||||
|
@ -61,7 +65,7 @@ public:
|
|||
/**
|
||||
* initialize the client, connect to host and port.
|
||||
*/
|
||||
virtual int initialize(std::string h, int p);
|
||||
virtual int initialize(std::string h, int p, int64_t t_us = SRS_HTTP_CLIENT_TIMEOUT_US);
|
||||
public:
|
||||
/**
|
||||
* to post data to the uri.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue