mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
33 lines
822 B
C++
33 lines
822 B
C++
#pragma once
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
#include <Server/TCPProtocolStackData.h>
|
|
|
|
namespace Poco
|
|
{
|
|
namespace Net
|
|
{
|
|
class StreamSocket;
|
|
class TCPServerConnection;
|
|
}
|
|
}
|
|
namespace DB
|
|
{
|
|
class TCPServer;
|
|
|
|
class TCPServerConnectionFactory
|
|
{
|
|
public:
|
|
using Ptr = Poco::SharedPtr<TCPServerConnectionFactory>;
|
|
|
|
virtual ~TCPServerConnectionFactory() = default;
|
|
|
|
/// Same as Poco::Net::TCPServerConnectionFactory except we can pass the TCPServer
|
|
virtual Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket, TCPServer & tcp_server) = 0;
|
|
virtual Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket, TCPServer & tcp_server, TCPProtocolStackData &/* stack_data */)
|
|
{
|
|
return createConnection(socket, tcp_server);
|
|
}
|
|
};
|
|
}
|