Thanks Tim! It seems to me that most streams are readable or writable, but not both. The main thing I'm asking is if there are commonly used streams that are both. Short of implementing my own custom stream that is both, the only example I've encountered is tls.connect(). Maybe it's fair to say that it is not common to have streams that are both readable and writable.
On Mon, Mar 19, 2012 at 7:31 AM, Tim Caswell <[email protected]> wrote: > From the node docs: http://nodejs.org/api/stream.html >> >> >> A stream is an abstract interface implemented by various objects in Node. >> For example a request to an HTTP server is a stream, as is stdout. Streams >> are readable, writable, or both. All streams are instances of EventEmitter. >> You can load up the Stream base class by doing require('stream'). > > > Also more docs at http://nodemanual.org/latest/nodejs_ref_guide/streams.html > > If you want to use Stream.prototype.pipe, make sure to implement enough of > the interface for it to work properly, especially the readable and writable > properties. > > On Sun, Mar 18, 2012 at 4:47 PM, Mark Volkmann <[email protected]> > wrote: >> >> IIUC, a stream can be both readable and writable. One way to create >> such a stream is tls.connect(). Are there other somewhat common ways >> to create such a stream short of implementing a custom stream? >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en > > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- R. Mark Volkmann Object Computing, Inc. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
