18 lines
448 B
C++
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);
|
|
}
|
|
|
|
}
|
|
|