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

Method onReadableEnd

Libraries/Http/HttpAsyncClient.cpp:950–971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948{
949 detachResponseDecompression();
950 response.failBodyStream(error);
951 response.abortBodyStream();
952 closeConnection();
953 state = State::Idle;
954 currentRequest = nullptr;
955 if (onError.isValid())
956 {
957 onError(error);
958 }
959}
960
961void HttpAsyncClient::onReadableError(Result result) { fail(result); }
962void HttpAsyncClient::onWritableError(Result result) { fail(result); }
963void HttpAsyncClient::onPipelineError(Result result) { fail(result); }
964
965void HttpAsyncClient::onReadableEnd()
966{
967 if (state == State::Idle)
968 {
969 closeConnection();
970 return;
971 }
972 if (state == State::StreamingResponse and response.getBodyFramingKind() == HttpBodyFramingKind::CloseDelimited and
973 response.hasReceivedHeaders())
974 {

Callers

nothing calls this directly

Calls 2

finishBodyStreamMethod · 0.80
ErrorEnum · 0.50

Tested by

no test coverage detected