HTTPServer/HTTPSessions.h
2022-06-29 11:38:44 -07:00

30 lines
646 B
C++

#ifndef __HTTPSessions_h__
#define __HTTPSessions_h__
#include "HTTPRequest.h"
#include "Command.h"
#include "TCPSession.h"
namespace http {
class HTTPSession;
class HTTPSessions : public core::Command {
public:
HTTPSession * findSessionByHeader(HTTPRequest &httpRequest);
HTTPSession * findSessionById(coreutils::ZString &sessionId, HTTPRequest &httpRequest);
int processCommand(std::string request, core::TCPSession *session, std::stringstream &data);
private:
HTTPSession * createHTTPSession(HTTPRequest &httpRequest);
std::map<coreutils::ZString, HTTPSession *> sessions;
};
}
#endif