aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-wrap-encoding.js
AgeCommit message (Collapse)Author
2018-12-28src: use consistent names for JSStreamSam Roberts
Its confusing to call a js class with a handle a "Wrap", usually it's the C++ handle that is called a Wrap (tcp_wrap, tls_wrap, ...). Its derived from Socket, and makes a JS stream look like a Socket, so call it that. Also, remove use of lib/_stream_wrap.js so it can be deprecated some time. PR-URL: https://github.com/nodejs/node/pull/25153 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-06-29stream: use more explicit statementsRuben Bridgewater
Using objectMode with stream_wrap has not worked properly before and would end in an error. Therefore prohibit the usage of objectMode alltogether. This also improves the handling performance due to the cheaper chunk check and by using explicit statements as they produce better code from the compiler. PR-URL: https://github.com/nodejs/node/pull/13863 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2015-12-06stream_wrap: error if stream has StringDecoderFedor Indutny
If `.setEncoding` was called on input stream - all emitted `data` will be `String`s instances, not `Buffer`s. This is unacceptable for `StreamWrap`, and should not lead to the crash. Fix: https://github.com/nodejs/node/issues/3970 PR-URL: https://github.com/nodejs/node/pull/4031 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>