ClickHouse/src/Storages/StorageMongoDBSocketFactory.h
2024-03-18 08:00:09 +00:00

20 lines
553 B
C++

#pragma once
#include <Poco/MongoDB/Connection.h>
namespace DB
{
class StorageMongoDBSocketFactory : public Poco::MongoDB::Connection::SocketFactory
{
public:
Poco::Net::StreamSocket createSocket(const std::string & host, int port, Poco::Timespan connectTimeout, bool secure) override;
private:
static Poco::Net::StreamSocket createPlainSocket(const std::string & host, int port, Poco::Timespan connectTimeout);
static Poco::Net::StreamSocket createSecureSocket(const std::string & host, int port, Poco::Timespan connectTimeout);
};
}