Open
Description
Hi. Great work on getting the spdy protocol working 🎉
Instead of having the transport.connection.create
accept a stream it would be nice if it instead just returned a duplex stream that you could pipe your transport to/from.
var spdy = transport.connection.create()
var socket = net.connect(...)
var req = spdy.request(...)
spdy.on('stream', function (stream) {
...
})
socket.pipe(spdy).pipe(socket)
This makes it easier compose stream pipelines with spdy. For example using stdin/stdout
process.stdin.pipe(spdy).pipe(process.stdout)
Or using an encrypted stream
transport.pipe(decryptor).pipe(spdy).pipe(encryptor).pipe(transport)
If this is something you'd be interested in adding I'd be happy to help out with a PR