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

Function DoraXrtHttpStreamCloseWith

Source/Http/XrtHttpClient.c:175–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175static void DoraXrtHttpStreamCloseWith(DoraXrtHttpStreamContext* ctx, xnet_result status) {
176 if (!ctx) {
177 return;
178 }
179 if (ctx->finalStatus == XRT_NET_AGAIN) {
180 ctx->finalStatus = status;
181 }
182 if (__xnetAtomicCompareExchange32(&ctx->closeRequested, 1, 0) == 0) {
183 if (ctx->stream) {
184 xrtNetStreamClose(ctx->stream, XNET_CLOSE_F_ABORT);
185 } else {
186 DoraXrtHttpStreamResolve(ctx, ctx->finalStatus);
187 }
188 }
189}
190
191static int DoraXrtHttpStreamAppend(DoraXrtHttpStreamContext* ctx, const char* data, size_t len) {
192 char* newBuf;

Calls 1

DoraXrtHttpStreamResolveFunction · 0.85

Tested by

no test coverage detected