Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

spdy-stream-muxer

0.6.1 • Public • Published

spdy-stream-muxer JavaScript implementation

Abstraction on top of spdy-transport, implementing the abstract-stream-muxer interface

Usage

spdy-stream-muxer follows the abstract-stream-muxer API

Example

// Client.js
var spdyStreamMuxer = require('spdy-stream-muxer')
 
var dialer = new spdyStreamMuxer()
 
var connDialer = dialer.attach(socket, false)
 
connDialer.dialStream(function (err, stream) {
  t.ifError(err, 'Should not throw')
  t.pass('dialed stream')
})
// Server.js
var spdyStreamMuxer = require('spdy-stream-muxer')
 
var listener = new spdyStreamMuxer()
 
var connListener = listener.attach(socket, true)
 
connListener.on('stream', function (stream) {
  t.pass('got stream')
})

Install

npm i spdy-stream-muxer

DownloadsWeekly Downloads

1

Version

0.6.1

License

MIT

Last publish

Collaborators

  • avatar