1
0
Fork 0
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:
winlin 2014-04-01 18:40:24 +08:00
parent 5bbb76a59d
commit e70609cea3
9 changed files with 948 additions and 847 deletions

View file

@ -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();