mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
20 lines
561 B
C++
20 lines
561 B
C++
#pragma once
|
|
|
|
#include <Poco/MongoDB/Connection.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class StorageMongoDBSocketFactory : public Poco::MongoDB::Connection::SocketFactory
|
|
{
|
|
public:
|
|
virtual 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);
|
|
};
|
|
|
|
}
|