MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / DoraXrtHttpDeliverChunk

Function DoraXrtHttpDeliverChunk

Source/Http/XrtHttpClient.c:509–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509static int DoraXrtHttpDeliverChunk(DoraXrtHttpStreamContext* ctx, const char* data, size_t len, size_t total) {
510 if (!ctx || len == 0u || ctx->suppressBody) {
511 return 1;
512 }
513 if (ctx->onChunk && ctx->onChunk(data, len, ctx->received, total, ctx->streamUserData)) {
514 DoraXrtHttpStreamCloseWith(ctx, XRT_NET_CANCELLED);
515 return 0;
516 }
517 return 1;
518}
519
520static int DoraXrtHttpProcessFixedBody(DoraXrtHttpStreamContext* ctx) {
521 while (ctx->pendingLen > 0u && ctx->received < ctx->contentLength) {

Calls 1

Tested by

no test coverage detected