12 ms·
Yeah we're talking about different things. Imagine you had a process in the browser that can respond to many concurrent long-running requests from the server. I
by apitman 3y ago
Yeah we're talking about different things. Imagine you had a process in the browser that can respond to many concurrent long-running requests from the server. In order to handle this with WebSockets, you need to implement your own multiplexing, because a) the server can't initiate a new WebSocket connection to the browser and b) opening a new WebSocket connect for each request doesn't fit the paradigm of request-response very well.
Note that WebTransport handles this for you, because the server can initiate new streams.
If you're sending lots of data, you also need per-stream backpressure.