streams: introduce StreamWrap and JSStream
authorFedor Indutny <fedor@indutny.com>
Mon, 23 Feb 2015 20:09:44 +0000 (23:09 +0300)
committerFedor Indutny <fedor@indutny.com>
Tue, 24 Feb 2015 19:38:21 +0000 (22:38 +0300)
commit1738c7783526868d86cb213414cb4d40c5a89662
tree956d199d9e1b7f793bfe60db58bef27583ca1ebb
parente00c938d246c29897344be3b3060533bb4ad7806
streams: introduce StreamWrap and JSStream

Introduce a way to wrap plain-js `stream.Duplex` streams into C++
StreamBase's child class. With such method at hand it is now possible to
pass `stream.Duplex` instance as a `socket` parameter to
`tls.connect()`.

PR-URL: https://github.com/iojs/io.js/pull/926
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
15 files changed:
lib/_stream_wrap.js [new file with mode: 0644]
lib/_tls_wrap.js
node.gyp
src/async-wrap.h
src/env.h
src/js_stream.cc
src/js_stream.h
src/node_wrap.h
src/stream_base.cc
src/stream_base.h
src/stream_wrap.cc
src/stream_wrap.h
src/tls_wrap.cc
src/tls_wrap.h
test/parallel/test-tls-js-stream.js [new file with mode: 0644]