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
|
@ -38,33 +38,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <http_parser.h>
|
||||
|
||||
class SrsSocket;
|
||||
class SrsBuffer;
|
||||
|
||||
enum SrsHttpParseState {
|
||||
SrsHttpParseStateInit = 0,
|
||||
SrsHttpParseStateStart,
|
||||
SrsHttpParseStateComplete
|
||||
};
|
||||
|
||||
class SrsHttpRequest
|
||||
{
|
||||
public:
|
||||
std::string url;
|
||||
http_parser header;
|
||||
SrsBuffer* body;
|
||||
SrsHttpParseState state;
|
||||
|
||||
SrsHttpRequest();
|
||||
virtual ~SrsHttpRequest();
|
||||
|
||||
virtual void reset();
|
||||
virtual bool is_complete();
|
||||
};
|
||||
class SrsHttpMessage;
|
||||
|
||||
class SrsHttpConn : public SrsConnection
|
||||
{
|
||||
private:
|
||||
SrsHttpRequest* req;
|
||||
SrsHttpMessage* req;
|
||||
public:
|
||||
SrsHttpConn(SrsServer* srs_server, st_netfd_t client_stfd);
|
||||
virtual ~SrsHttpConn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue