Provide official utility helpers (e.g. stream piping) in uWebSockets.js
Hi,
it would be very helpful to have some officially exported and maintained utility functions in uWebSockets.js.
For example, in the repository there are useful patterns like: pipeStreamOverResponse from the VideoStreamer example https://github.com/uNetworking/uWebSockets.js/blob/master/examples/VideoStreamer.js#L38
This kind of helper is extremely useful when working with streaming responses, but currently it is only available as an example and not as part of the public API.
Having these utilities officially exposed and maintained as part of the library, would make it easier to correctly implement common patterns (like streaming, backpressure handling, etc.) and reduce the need to copy-paste code from examples.
Consider exporting a small set of well-tested helpers (e.g. stream piping utilities) directly from the library
Thanks!
1 条评论