2021-10-22 07:15:34 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Poco/SharedPtr.h>
|
2022-09-29 00:13:40 +00:00
|
|
|
#include <Server/TCPProtocolStackData.h>
|
2021-10-22 07:15:34 +00:00
|
|
|
|
|
|
|
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;
|
2022-09-10 20:21:37 +00:00
|
|
|
virtual Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket, TCPServer & tcp_server, TCPProtocolStackData &/* stack_data */)
|
|
|
|
{
|
|
|
|
return createConnection(socket, tcp_server);
|
|
|
|
}
|
2021-10-22 07:15:34 +00:00
|
|
|
};
|
|
|
|
}
|