#ifndef __HTTPServer_h__
#define __HTTPServer_h__

#include "TCPServer.h"
#include "HTTPSessions.h"
#include "HTTPPageList.h"
#include "HTTPHandler.h"

namespace http {
 
   class HTTPServer : public core::TCPServer {
      
    public:
      HTTPServer(core::EPoll &ePoll, core::IPAddress ipAddress, HTTPSessions &httpSessions) 
      : TCPServer(ePoll, ipAddress), httpSessions(httpSessions) {
         commands.add(getHandler, "GET");
         commands.add(postHandler, "POST");
      }

      HTTPSessions &httpSessions;
      HTTPPageList pageList;
           
    private:
      HTTPHandler getHandler;
      HTTPHandler postHandler;

   };
  
}

#endif
