]> git.tdb.fi Git - libs/net.git/blobdiff - source/server.h
Support handling requests asynchronously
[libs/net.git] / source / server.h
index ea1213483774799f69c2cc60bd8f3f2c25dc39b6..93c1f593561f5d1d335c6067867fd78abddd145c 100644 (file)
@@ -29,6 +29,8 @@ private:
                RefPtr<Net::StreamSocket> sock;
                std::string in_buf;
                Request *request;
+               Response *response;
+               bool async;
                bool stale;
 
                Client(RefPtr<Net::StreamSocket>);
@@ -41,11 +43,15 @@ private:
 
 public:
        Server(unsigned);
+       unsigned get_port() const;
        void use_event_dispatcher(IO::EventDispatcher *);
+       void delay_response(Response &);
+       void submit_response(Response &);
 private:
        void data_available();
        void client_data_available(Client &);
        void client_end_of_file(Client &);
+       Client &get_client_by_response(Response &);
 };
 
 } // namespace Http