Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
fix(dial): fix typo causing plaintext mode to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Sep 7, 2016
1 parent 42fafd8 commit 6091e94
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,32 @@ Close all the listeners and muxers.

- `callback`

### 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 why we did this, see the discussion at this [issue](https://github.com/ipfs/js-ipfs/issues/362).

You can learn more about pull-streams at:

- [The history of Node.js streams, nodebp April 2014](https://www.youtube.com/watch?v=g5ewQEuXjsQ)
- [The history of streams, 2016](http://dominictarr.com/post/145135293917/history-of-streams)
- [pull-streams, the simple streaming primitive](http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple)
- [pull-streams documentation](https://pull-stream.github.io/)

#### Converting `pull-streams` to Node.js Streams

If you are a Node.js streams user, you can convert a pull-stream to a Node.js stream using the module [`pull-stream-to-stream`](https://github.com/dominictarr/pull-stream-to-stream), giving you an instance of a Node.js stream that is linked to the pull-stream. For example:

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

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

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



## Design

### Multitransport
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"libp2p-secio": "^0.4.2",
"libp2p-spdy": "^0.9.0",
"libp2p-tcp": "^0.8.1",
"libp2p-webrtc-star": "^0.4.1",
"libp2p-webrtc-star": "^0.4.4",
"libp2p-websockets": "^0.8.1",
"pre-commit": "^1.1.3",
"pull-goodbye": "0.0.1",
Expand Down
1 change: 0 additions & 1 deletion src/dial.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ module.exports = function dial (swarm) {
}

const id = swarm._peerInfo.id

log('selecting crypto: %s', swarm.crypto.tag)
ms.select(swarm.crypto.tag, (err, conn) => {
if (err) {
Expand Down

0 comments on commit 6091e94

Please sign in to comment.