X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fhttp%2Fserver.h;h=3679013dda51c22c9f76438298b870e069bcd6e1;hb=ebbf753626c9e5dd26743c379741c53f9f11866e;hp=41894db99d6141dc89c901c354d06b4f25ca25b3;hpb=cf8d2e48581eeb8f1b83e8c48321a0bc2ffa6d83;p=libs%2Fnet.git diff --git a/source/http/server.h b/source/http/server.h index 41894db..3679013 100644 --- a/source/http/server.h +++ b/source/http/server.h @@ -23,6 +23,7 @@ private: std::string in_buf; Request *request; Response *response; + bool keepalive; bool async; bool stale; @@ -32,17 +33,22 @@ private: Net::StreamServerSocket sock; std::list clients; + std::map responses; IO::EventDispatcher *event_disp; public: Server(unsigned); + ~Server(); + 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 &); };