2022-09-10 20:21:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <Poco/Net/StreamSocket.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2022-09-29 00:13:40 +00:00
|
|
|
// Data to communicate between protocol layers
|
2022-09-10 20:21:37 +00:00
|
|
|
struct TCPProtocolStackData
|
|
|
|
{
|
2022-09-29 00:13:40 +00:00
|
|
|
// socket implementation can be replaced by some layer - TLS as an example
|
2022-09-10 20:21:37 +00:00
|
|
|
Poco::Net::StreamSocket socket;
|
2022-09-29 00:13:40 +00:00
|
|
|
// host from PROXY layer
|
2022-09-10 20:21:37 +00:00
|
|
|
std::string forwarded_for;
|
2022-09-29 00:13:40 +00:00
|
|
|
// certificate path from TLS layer to TCP layer
|
2022-09-18 07:11:52 +00:00
|
|
|
std::string certificate;
|
2022-09-29 00:13:40 +00:00
|
|
|
// default database from endpoint configuration to TCP layer
|
2022-09-19 02:01:09 +00:00
|
|
|
std::string default_database;
|
2022-09-10 20:21:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|