#ifndef __HTTPConnection_h__ #define __HTTPConnection_h__ #include "TCPSession.h" #include "Log.h" namespace http { class HTTPConnection : public core::TCPSession { public: HTTPConnection(core::EPoll &ePoll, core::TCPServer &server) : TCPSession(ePoll, server, "HTTP Connection") {} void onDataReceived(char *data, int len) override { coreutils::Log(coreutils::LOG_DEBUG_1) << data; protocol(std::string(data, len)); send(); } }; } #endif