Skip to content
This repository was archived by the owner on Nov 25, 2017. It is now read-only.

Latest commit

 

History

History
74 lines (46 loc) · 2.09 KB

README.md

File metadata and controls

74 lines (46 loc) · 2.09 KB

DEPRECATED

Use libp2p-spdy instead



spdy-stream-muxer JavaScript implementation

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

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

Table of Contents

Install

npm i spdy-stream-muxer

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')
})

Contribute

This is deprecated. Please know that any open issues or PRs will likely not be prioritized.

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.

License

MIT © 2015 David Dias