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

Commit bfbe84f

Browse files
committed
fix(dial): fix typo causing plaintext mode to fail
1 parent 42fafd8 commit bfbe84f

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,32 @@ Close all the listeners and muxers.
163163

164164
- `callback`
165165

166+
### This module uses `pull-streams`
167+
168+
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).
169+
170+
You can learn more about pull-streams at:
171+
172+
- [The history of Node.js streams, nodebp April 2014](https://www.youtube.com/watch?v=g5ewQEuXjsQ)
173+
- [The history of streams, 2016](http://dominictarr.com/post/145135293917/history-of-streams)
174+
- [pull-streams, the simple streaming primitive](http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple)
175+
- [pull-streams documentation](https://pull-stream.github.io/)
176+
177+
#### Converting `pull-streams` to Node.js Streams
178+
179+
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:
180+
181+
```js
182+
const pullToStream = require('pull-stream-to-stream')
183+
184+
const nodeStreamInstance = pullToStream(pullStreamInstance)
185+
// nodeStreamInstance is an instance of a Node.js Stream
186+
```
187+
188+
To learn more about this utility, visit https://pull-stream.github.io/#pull-stream-to-stream.
189+
190+
191+
166192
## Design
167193

168194
### Multitransport

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"libp2p-secio": "^0.4.2",
4646
"libp2p-spdy": "^0.9.0",
4747
"libp2p-tcp": "^0.8.1",
48-
"libp2p-webrtc-star": "^0.4.1",
48+
"libp2p-webrtc-star": "^0.4.2",
4949
"libp2p-websockets": "^0.8.1",
5050
"pre-commit": "^1.1.3",
5151
"pull-goodbye": "0.0.1",

src/dial.js

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ module.exports = function dial (swarm) {
106106
}
107107

108108
const id = swarm._peerInfo.id
109-
110109
log('selecting crypto: %s', swarm.crypto.tag)
111110
ms.select(swarm.crypto.tag, (err, conn) => {
112111
if (err) {

0 commit comments

Comments
 (0)