Neverending Pile of Messages
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

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

9

version

0.6.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability