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

Method hasMoreRequests

base/poco/Net/src/HTTPServerSession.cpp:43–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43bool HTTPServerSession::hasMoreRequests()
44{
45 if (!socket().impl()->initialized()) return false;
46
47 if (_firstRequest)
48 {
49 _firstRequest = false;
50 --_maxKeepAliveRequests;
51 return socket().poll(getTimeout(), Socket::SELECT_READ);
52 }
53 else if (canKeepAlive())
54 {
55 if (_maxKeepAliveRequests > 0)
56 --_maxKeepAliveRequests;
57 return buffered() > 0 || socket().poll(_keepAliveTimeout, Socket::SELECT_READ);
58 }
59 else
60 return false;
61}
62
63
64SocketAddress HTTPServerSession::clientAddress()

Callers 2

runMethod · 0.80
runMethod · 0.80

Calls 4

bufferedFunction · 0.85
initializedMethod · 0.45
implMethod · 0.45
pollMethod · 0.45

Tested by

no test coverage detected