WebSocket in browser with true back-pressure

332 Views Asked by At

I learned the hard way that the browsers' WebSocket API does not support back-pressure. Is there a way to work around this limitation without having to manually implement control flow on the application layer protocol? Would it for example be possible to implement a full WebSocket client in WASM, instead of having to proxy everything through the browser's API?

1

There are 1 best solutions below

0
Nikolay Handzhiyski On

Back-pressure: no changes to the protocol that are addressing this issue are published to this time.

WebAssembly: there is no access to the WebSocket API (or any other) at this time from a pure WebAssembly module. You will have to use JavaScript in one way or another.