David Dias 4b0f9e201c Merge pull request #18 from libp2p/pull
[WIP] Move to pull-streams
2016-09-06 08:48:31 -04:00
2016-09-05 19:00:23 -04:00
2016-09-05 19:00:23 -04:00
2016-03-23 16:23:10 +01:00
2016-04-14 02:56:49 +01:00
2016-05-08 23:08:00 +02:00
2016-05-08 23:08:00 +02:00
2016-02-25 12:21:14 +00:00

js-libp2p-websockets

Coverage Status Travis CI Circle CI Dependency Status js-standard-style

JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport interface

Description

libp2p-websockets is the WebSockets implementation compatible with libp2p.

Note: This module uses pull-streams for all stream based interfaces.

Example

TODO

Installation

npm

> npm i libp2p-websockets

This module uses pull-streams

We expose a streaming interface based on pull-streams, rather then on the Node.js core streams implementation (aka Node.js streams). pull-streams offers us a better mechanism for error handling and flow control guarantees. If you would like to know more about what took us to make this migration, see the discussion at this issue.

You can learn more about pull-streams at:

Converting pull-streams to Node.js Streams

If you are a Node.js streams user, you can convert a pull-stream to Node.js Stream using the module pull-stream-to-stream, giving you an instance of a Node.js stream that is linked to the pull-stream. Example:

const pullToStream = require('pull-stream-to-stream')

const nodeStreamInstance = pullToStream(pullStreamInstance)
// nodeStreamInstance is an instance of a Node.js Stream

To learn more about his utility, visit https://pull-stream.github.io/#pull-stream-to-stream

API

Description
No description provided
Readme 1.5 MiB
Languages
JavaScript 100%