MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / createClientSession

Method createClientSession

base/poco/Net/src/HTTPSessionFactory.cpp:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93HTTPClientSession* HTTPSessionFactory::createClientSession(const Poco::URI& uri)
94{
95 FastMutex::ScopedLock lock(_mutex);
96
97 if (uri.isRelative()) throw Poco::UnknownURISchemeException("Relative URIs are not supported by HTTPSessionFactory.");
98
99 Instantiators::iterator it = _instantiators.find(uri.getScheme());
100 if (it != _instantiators.end())
101 {
102 it->second.pIn->setProxy(_proxyHost, _proxyPort);
103 it->second.pIn->setProxyCredentials(_proxyUsername, _proxyPassword);
104 return it->second.pIn->createClientSession(uri);
105 }
106 else throw Poco::UnknownURISchemeException(uri.getScheme());
107}
108
109
110void HTTPSessionFactory::setProxy(const std::string& host, Poco::UInt16 port)

Callers 1

proxyConnectMethod · 0.45

Calls 5

isRelativeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
setProxyMethod · 0.45
setProxyCredentialsMethod · 0.45

Tested by

no test coverage detected