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

Method onData

Tests/Libraries/Http/HttpAsyncClientTest.cpp:1068–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066 SC_TEST_EXPECT(threadPool.create(2));
1067 }
1068 SC_TEST_EXPECT(httpServer.init(Span<ServerConnection>(connections)));
1069 SC_TEST_EXPECT(httpServer.start(loop, "127.0.0.1", port));
1070 SC_TEST_EXPECT(fileServer.init(threadPool, loop, webServerFolder));
1071 struct ServerContext
1072 {
1073 HttpAsyncFileServer& fileServer;
1074 HttpAsyncFileServer::StreamQueue<2>* streams;
1075 } serverCtx = {fileServer, streams};
1076 httpServer.onRequest = [this, &serverCtx](HttpConnection& connection)
1077 {
1078 SC_TEST_EXPECT(
1079 serverCtx.fileServer.handleRequest(serverCtx.streams[connection.getConnectionID().getIndex()], connection));

Callers

nothing calls this directly

Calls 9

getReadableDataMethod · 0.80
consumeBodyBytesMethod · 0.80
startResponseMethod · 0.80
sendHeadersMethod · 0.80
appendFunction · 0.50
sizeInBytesMethod · 0.45
addHeaderMethod · 0.45
writeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected