]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/server.h
Allow creating an Http::Server without immediately listening
[libs/net.git] / source / http / server.h
index 04c2d06b5cf6d386fa7d3f357036f3efaabba4df..dd054201d1bf421e136a97c4c2365e8f408cac70 100644 (file)
@@ -23,6 +23,7 @@ private:
                std::string in_buf;
                Request *request;
                Response *response;
+               bool keepalive;
                bool async;
                bool stale;
 
@@ -36,16 +37,20 @@ private:
        IO::EventDispatcher *event_disp;
 
 public:
+       Server();
        Server(unsigned);
        ~Server();
 
+       void listen(unsigned);
        unsigned get_port() const;
        void use_event_dispatcher(IO::EventDispatcher *);
        void delay_response(Response &);
        void submit_response(Response &);
+       void cancel_keepalive(Response &);
 private:
        void data_available();
        void client_data_available(Client &);
+       void send_response(Client &, Response &);
        void client_end_of_file(Client &);
        Client &get_client_by_response(Response &);
 };