Re: [whatwg/fetch] Set body with byte reading support (PR #1593)

@domenic (1) suits me, because it matches the way we'll actually implement it.

If you're reading directly from a kernel buffer and we're using TCP then the kernel will ensure that you don't lose data, applying backpressure if you stop reading for a while.

However, in practice we're almost always using TLS, so there's a TLS library also buffering between us and the kernel. It will also be careful not to drop data and will apply backpressure when its finite buffer is full, so no problem there.

If we're using UDP, then since this is Fetch I assume we're using QUIC. QUIC provides in-order reliable streams, so you won't lose data. I'm pretty sure backpressure works similarly to TCP within a stream.

In Chrome we have a bunch of extra abstraction layers, but I assume you're thinking about server software that runs closer to the OS.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1593#issuecomment-1381740232
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1593/c1381740232@github.com>

Received on Friday, 13 January 2023 11:41:30 UTC