1 | #pragma once |
---|---|
2 | #include <Poco/Net/HTTPRequestHandler.h> |
3 | |
4 | namespace DB |
5 | { |
6 | /** Simple ping handler, answers "Ok." to GET request |
7 | */ |
8 | class PingHandler : public Poco::Net::HTTPRequestHandler |
9 | { |
10 | public: |
11 | PingHandler(size_t keep_alive_timeout_) : keep_alive_timeout(keep_alive_timeout_) {} |
12 | void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override; |
13 | |
14 | private: |
15 | size_t keep_alive_timeout; |
16 | }; |
17 | } |
18 |