Merge pull request #1827 from micheleselea/develop

HttpClientSession set specific proxysettings for attached socket
This commit is contained in:
Günter Obiltschnig 2017-11-12 20:55:52 +01:00 committed by GitHub
commit af95fb4968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -100,6 +100,9 @@ public:
HTTPClientSession(const std::string& host, Poco::UInt16 port, const ProxyConfig& proxyConfig);
/// Creates a HTTPClientSession using the given host, port and proxy configuration.
HTTPClientSession(const StreamSocket& socket, const ProxyConfig& proxyConfig);
/// Creates a HTTPClientSession using the given socket and proxy configuration.
virtual ~HTTPClientSession();
/// Destroys the HTTPClientSession and closes

View File

@ -58,8 +58,9 @@ HTTPClientSession::HTTPClientSession(const StreamSocket& socket):
_reconnect(false),
_mustReconnect(false),
_expectResponseBody(false),
_responseReceived(false)
_responseReceived(false)
{
setKeepAlive(true);
}
@ -101,7 +102,19 @@ HTTPClientSession::HTTPClientSession(const std::string& host, Poco::UInt16 port,
{
}
HTTPClientSession::HTTPClientSession(const StreamSocket& socket, const ProxyConfig& proxyConfig):
HTTPSession(socket),
_port(HTTPSession::HTTP_PORT),
_proxyConfig(proxyConfig),
_keepAliveTimeout(DEFAULT_KEEP_ALIVE_TIMEOUT, 0),
_reconnect(false),
_mustReconnect(false),
_expectResponseBody(false),
_responseReceived(false)
{
setKeepAlive(true);
}
HTTPClientSession::~HTTPClientSession()
{
}