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

Method startReceiveResponse

Tests/Libraries/Http/HttpTestClient.cpp:352–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352void SC::HttpTestClient::startReceiveResponse(AsyncSocketSend::Result& result)
353{
354 (void)(result);
355 SC_ASSERT_RELEASE(content.resizeWithoutInitializing(1024));
356
357 receivedBytes = 0;
358 headersReceived = false;
359 receiveAsync.callback.bind<HttpTestClient, &HttpTestClient::tryParseResponse>(*this);
360 auto res = receiveAsync.start(*eventLoop, clientSocket, content.toSpan());
361 if (not res)
362 {
363 // TODO: raise error
364 }
365}
366
367void SC::HttpTestClient::tryParseResponse(AsyncSocketReceive::Result& result)
368{

Callers

nothing calls this directly

Calls 3

toSpanMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected