MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / handle_client

Function handle_client

app/server/http.cpp:263–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 require_within_body_cap();
262 // A chunk is handed out in windows rather than all at once. Reads that stay
263 // inside the published get area never re-enter underflow(), so publishing a
264 // whole 8 MiB chunk would let the body keep advancing across many model
265 // iterations without the deadline ever being consulted again. Windowing puts
266 // a bound on how far past the deadline consumption can get.
267 if (publish_window()) {
268 return traits_type::to_int_type(*gptr());
269 }
270 if (!next_chunk()) {
271 return traits_type::eof();
272 }
273 return traits_type::to_int_type(*gptr());
274 }
275
276private:
277 // poll() rather than select(): an accepted descriptor can be >= FD_SETSIZE
278 // once enough connections are open, and FD_SET on such a descriptor is
279 // undefined behaviour that corrupts the stack.

Callers

nothing calls this directly

Calls 6

read_http_requestFunction · 0.85
send_allFunction · 0.85
serialize_responseFunction · 0.85
error_responseFunction · 0.85
handleMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected