Replies: 2 comments 3 replies
-
Yes, this is actually almost finished and should be pushed in the next update. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Websocket streaming is now available in update 5.4.0 with the Websocket.stream() method and the abilitiy to pipe a stream to the Websocket.writable property. The syntax/flow implemented is very similar to Response streaming but be careful to not initiate two streaming operations at the same time. You must wait for the stream() Promise to resolve or your piped readable stream to emit the 'close' event before initiating another streaming operation. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there support in hyper-express for nodejs streams API?
This is available in the
ws
module and one of the possible use cases is to be able to pause/resume reading from a websocket to apply some back-pressure to the sender under high load:https://github.com/websockets/ws#use-the-nodejs-streams-api
Or maybe there is a different way with hyper-express to pause reading from the websocket and apply this type of backpressure from the server to the client?
Beta Was this translation helpful? Give feedback.
All reactions