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

Method assign

base/poco/Net/src/HTTPClientSession.cpp:587–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587void HTTPClientSession::assign(Poco::Net::HTTPClientSession & session)
588{
589 poco_assert (this != &session);
590
591 if (session.buffered())
592 throw Poco::LogicException("assign a session with not empty buffered data");
593
594 if (buffered())
595 throw Poco::LogicException("assign to a session with not empty buffered data");
596
597 poco_assert(!connected());
598
599 setResolvedHost(session.getResolvedHost());
600 setProxyConfig(session.getProxyConfig());
601
602 setTimeout(session.getConnectionTimeout(), session.getSendTimeout(), session.getReceiveTimeout());
603 setKeepAlive(session.getKeepAlive());
604
605 setLastRequest(session.getLastRequest());
606 setKeepAliveTimeout(session.getKeepAliveTimeout());
607
608 _keepAliveMaxRequests = session._keepAliveMaxRequests;
609 _keepAliveCurrentRequest = session._keepAliveCurrentRequest;
610
611 attachSocket(session.detachSocket());
612
613 session.reset();
614}
615
616} } // namespace Poco::Net

Callers 4

extractCredentialsMethod · 0.45
getOptionMethod · 0.45
drainBufferMethod · 0.45
HostEntryMethod · 0.45

Calls 10

bufferedFunction · 0.85
setResolvedHostFunction · 0.85
bufferedMethod · 0.80
getConnectionTimeoutMethod · 0.80
getSendTimeoutMethod · 0.45
getReceiveTimeoutMethod · 0.45
getKeepAliveMethod · 0.45
getKeepAliveTimeoutMethod · 0.45
detachSocketMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected