MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / close

Method close

Libraries/Http/HttpAsyncClient.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23Result HttpAsyncClient::close()
24{
25 detachResponseDecompression();
26 response.failBodyStream(Result::Error("HttpAsyncClient closed"));
27 response.abortBodyStream();
28 closeConnection();
29 state = State::Idle;
30 currentRequest = nullptr;
31 webSocketUpgraded = false;
32 request.reset();
33 return Result(true);
34}
35
36Result HttpAsyncClient::start(AsyncEventLoop& loop, HttpParser::Method method, StringSpan url, bool keepAlive)
37{

Callers 1

closeConnectionMethod · 0.45

Calls 5

failBodyStreamMethod · 0.80
abortBodyStreamMethod · 0.80
ErrorEnum · 0.50
ResultClass · 0.50
resetMethod · 0.45

Tested by

no test coverage detected