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

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

License

Notifications You must be signed in to change notification settings

libp2p/js-spdy-stream-muxer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published