HTTPServer/HTTPConnection.h
2020-12-09 09:40:32 -08:00

28 lines
507 B
C++

#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