#pragma once #include #include #include #include #include namespace DB { class PostgreSQLHandlerFactory : public Poco::Net::TCPServerConnectionFactory { private: IServer & server; Poco::Logger * log; #if USE_SSL bool ssl_enabled = true; #else bool ssl_enabled = false; #endif std::atomic last_connection_id = 0; std::vector> auth_methods; public: explicit PostgreSQLHandlerFactory(IServer & server_); Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket) override; }; }