HTTPServer/HTTPServer.cpp
2024-08-22 16:13:12 -07:00

18 lines
448 B
C++

#include "HTTPServer.h"
namespace http {
HTTPServer::HTTPServer(core::EPoll &ePoll, core::IPAddress ipAddress, HTTPSessions &httpSessions)
: TCPServer(ePoll, ipAddress), httpSessions(httpSessions) {
commands.add(getHandler, "GET");
commands.add(postHandler, "POST");
commands.add(putHandler, "PUT");
}
core::TCPSession * HTTPServer::getSocketAccept(core::EPoll &epoll) {
return new HTTPConnection(ePoll, this);
}
}