-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream writable/readable properties are undocumented as of streams2 #21431
Comments
+1 |
https://nodejs.org/docs/v0.9.4/api/stream.html#stream_class_stream_writable |
@nodejs/streams |
I think these should be documented. They are used in the wild. @strugee would you like to send a PR? |
I am also willing to help with PR |
Hey, sorry for the delay! I looked into this briefly and realized I'd have to dig through the source to make sure I had the right implementation details, and I haven't had time to do that yet. @thatshailesh given the situation, if you want to take this then by all means go ahead! Otherwise I can do this when I find some time :) |
Ok Sure, I'll send it thanks :) |
@strugee Hey I just found this Both are there in the doc, hope it resolves the issue :) |
@thatshailesh - no, you linked to the uppercase |
@felixrabe is correct. What we are looking for is something like https://nodejs.org/docs/v0.8.0/api/stream.html#stream_stream_readable, but note that that's for 0.8 streams and not streams2, which is why I said I'd have to dig into the implementation to make sure I wrote something correct. |
Those properties are sill there, and I suspect they still work as before. I think they are still there for compatibility reason. You might want to add unit tests for them if there are none. |
So, I just wrote an issue and closed it as a duplicate. It is however not exactly a duplicate, but probably worth covering in the same breath as this issue.
|
@ronkorving I think |
@mcollina Can they though? |
net.Socket can set it to false after calling the Writable constructor. The
machinery for setting it to false on destroy should be there. It can also
be part of the refactor myself and @mafintosh plan to do.
Il giorno mar 31 lug 2018 alle 21:36 Ron Korving <notifications@github.com>
ha scritto:
… @mcollina <https://github.com/mcollina> Can they though? net.Socket sets
writable to true the moment connect() is called on it. I don't think
there's a Writable hook there that could be depended upon to set that
boolean instead. Got any suggestions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21431 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADL4wmXtv5c4ZAoZilxrWgc8rvQrszHks5uMQY1gaJpZM4Uwo5r>
.
|
@mcollina So then you're suggesting we move the entire property to net.Socket, right? Rather than Readable and Writable as I think you were suggesting in your previous comment? I don't mind if you guys pick it up of course 👍 |
We are a bit strained atm, so if you want to send a PR it would be very welcomed. IMHO we should have those in |
@mcollina I fully agree with that approach. I may make a PR, but am a bit strained myself. |
This is fixed in : #23933. Hence closing it. Please re-open if I'm incorrect. |
stream.Writable#writable is no longer documented, but according to https://stackoverflow.com/a/23094413/1198896 it exists and probably should be documented. Presumably the same is true for stream.Readable#readable?
The text was updated successfully, but these errors were encountered: