X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fhttp%2Fserver.h;h=e6de22781d17077a8e26a66925231780de4c518d;hb=3ab65d35cfd696002e09768a38f98e6a2e1ade81;hp=dd054201d1bf421e136a97c4c2365e8f408cac70;hpb=3bea0872d89d4e980d1df6a24298bbb7f8e101fb;p=libs%2Fnet.git diff --git a/source/http/server.h b/source/http/server.h index dd05420..e6de227 100644 --- a/source/http/server.h +++ b/source/http/server.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace Msp { namespace Http { @@ -21,11 +22,11 @@ private: { RefPtr sock; std::string in_buf; - Request *request; - Response *response; - bool keepalive; - bool async; - bool stale; + Request *request = nullptr; + Response *response = nullptr; + bool keepalive = false; + bool async = false; + bool stale = false; Client(RefPtr); ~Client(); @@ -34,7 +35,7 @@ private: Net::StreamServerSocket sock; std::list clients; std::map responses; - IO::EventDispatcher *event_disp; + IO::EventDispatcher *event_disp = nullptr; public: Server(); @@ -47,6 +48,7 @@ public: void delay_response(Response &); void submit_response(Response &); void cancel_keepalive(Response &); + void close_connections(const Time::TimeDelta &); private: void data_available(); void client_data_available(Client &);