3 ms·
Heh. The WebSocket implementation I wrote for KJ does in fact provide backpressure (the send() method returns a promise that resolves when it's a good time to s
by kentonv 7y ago
Heh. The WebSocket implementation I wrote for KJ does in fact provide backpressure (the send() method returns a promise that resolves when it's a good time to send the next message). I guess I'm surprised to hear that most don't...
- anderspitman 7y agoI think it's more likely I've just been too deep in JS-land. Does KJ send() do any internal buffering, or wait for the OS to tell it to send more?
- kentonv 7y agoIt waits for the OS.
- decentralised 7y agoI've been looking into streams in detail recently because I'm preparing for the OpenJSF exam... maybe this is relevant to you too: https://nodejs.org/es/docs/guides/backpressuring-in-streams/ https://nodejs.org/es/docs/guides/backpressuring-in-streams/
- anderspitman 7y agoThanks for the link. I'm actually quite familiar with that article. It's been very useful for me when designing omnistreams. You may find some of the links on the bottom of this page useful: https://github.com/omnistreams/omnistreams-spec https://github.com/omnistreams/omnistreams-spec