|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
A borrowed connection, held for as long as a caller needs it. More...
#include <cpp/a11/net/http/connection_pool.h>
Public Member Functions | |
| HttpConnectionLease ()=default | |
| const std::shared_ptr< Http2Client > & | client () const |
| bool | reused () const |
| bool | multiplexed () const |
| void | Release () |
| Releases this share of the connection early; the destructor does it too. | |
Friends | |
| class | HttpConnectionPool |
A borrowed connection, held for as long as a caller needs it.
The unit of lifetime the pool works in: the connection is closed when the last lease on it goes away. Hold one for the whole exchange – from the request to the last byte of the response, including its trailers – because dropping it early may close the socket mid-response.
Copyable, and a copy is another share of the same connection rather than a new one, so a lease can be captured by whatever outlives the call that took it.
|
default |
|
inline |
| bool a11::net::HttpConnectionLease::multiplexed | ( | ) | const |
|
inline |
Releases this share of the connection early; the destructor does it too.
|
inline |
|
friend |