You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
quic/stream/iter: Is QuicStream writer general enough for a base class? #66508
I am currently trying to convert my http2 webtransport capsule code to match a subset of QuicStream interface.
Currently, I am looking at getWriter and I am wondering, if most of this implementation is generell enough for a base stream/iter class . (Excuse my C++ jargon) .
I have just copied it over and I do not see so many places, where I have to change a thing.
So I wonder, if this should be moved to a separete place to be reusuable? (Of course the reader part may be a similar thing, but I have started with the writer).
@jasnell@pimterry What do you think?
And is it planed to have a stream/iter npm package to be used e.g. for the browser? (I like use there stream/iter as well).
Ok, then I will stop working on the copy of getWriter and I will instead try to generalize it. (I hope you do not mind).
I think it is basically a comparable amount of work.
The first idea would be a function getWriter with an object with some callbacks, which are the implementation of the writer.
Do you have a tip regarding the primordials ? Does somewhere a polyfill/ponyfill exists, so that I can write the code once and reuse it also outside node.js?
Activity
jasnell commentedon Oct 4, 2026
It's absolutely worth generalizing. I hadn't done so yet while developing but it's been on the todo list
martenrichter commentedon Oct 4, 2026
Ok, then I will stop working on the copy of getWriter and I will instead try to generalize it. (I hope you do not mind).
I think it is basically a comparable amount of work.
The first idea would be a function
getWriterwith an object with some callbacks, which are the implementation of the writer.Do you have a tip regarding the primordials ? Does somewhere a polyfill/ponyfill exists, so that I can write the code once and reuse it also outside node.js?
quic: create gen. getWriter for stream/iter
quic: create gen. getWriter for stream/iter
quic: create gen. getWriter for stream/iter
quic: create gen. getWriter for stream/iter