mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, extract http hooks.
This commit is contained in:
parent
5bbb76a59d
commit
e70609cea3
9 changed files with 948 additions and 847 deletions
|
@ -36,33 +36,10 @@ using namespace std;
|
|||
|
||||
#define SRS_HTTP_HEADER_BUFFER 1024
|
||||
|
||||
SrsHttpRequest::SrsHttpRequest()
|
||||
{
|
||||
body = new SrsBuffer();
|
||||
state = SrsHttpParseStateInit;
|
||||
}
|
||||
|
||||
SrsHttpRequest::~SrsHttpRequest()
|
||||
{
|
||||
srs_freep(body);
|
||||
}
|
||||
|
||||
void SrsHttpRequest::reset()
|
||||
{
|
||||
state = SrsHttpParseStateInit;
|
||||
body->clear();
|
||||
url = "";
|
||||
}
|
||||
|
||||
bool SrsHttpRequest::is_complete()
|
||||
{
|
||||
return state == SrsHttpParseStateComplete;
|
||||
}
|
||||
|
||||
SrsHttpConn::SrsHttpConn(SrsServer* srs_server, st_netfd_t client_stfd)
|
||||
: SrsConnection(srs_server, client_stfd)
|
||||
{
|
||||
req = new SrsHttpRequest();
|
||||
req = new SrsHttpMessage();
|
||||
}
|
||||
|
||||
SrsHttpConn::~SrsHttpConn()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue