#pragma once #include #include #include #include "request.h" namespace firecgi { class Server { public: Server(int port, const std::function& callback, int threads=1, const std::unordered_set& headers={}); void Serve(); private: void NewConn(int listen_sock, int epoll_fd); int NewListenSock(); void ServeInt(); const int port_; const std::function callback_; const int threads_; const std::unordered_set headers_; }; } // firecgi