-
Notifications
You must be signed in to change notification settings - Fork 28
Replace spdy with multiplex + echo example changes #55
Conversation
pull.collect((err, data) => { | ||
if (err) { | ||
throw err | ||
} | ||
console.log('received echo:', data.toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -55,12 +62,14 @@ async.parallel([ | |||
pull( | |||
pull.values(['hey']), | |||
conn, | |||
pull.through(console.log), | |||
pull.through((data) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drain, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! Thanks, fixed!
@@ -34,7 +34,14 @@ async.parallel([ | |||
|
|||
const peerListener = new PeerInfo(ids[1]) | |||
idListener = ids[1] | |||
peerListener.multiaddr.add(multiaddr('/ip4/127.0.0.1/tcp/10333')) | |||
|
|||
let toDial = '/ip4/127.0.0.1/tcp/10333' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is missing here, it should have the /ipfs/Qmhash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a leftover from how it was before. Example seems to work anyways. You want me to add it though, since the ID in our echo example is always the same anyways?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? Tried without, and it's working
Now latest js-libp2p-ipfs-nodejs can use both muxer, let's continue tracking this bug here: https://github.com/ipfs/js-libp2p-ipfs-nodejs/issues/59 |
Replaced spdy with multiplex for testing interop with go-libp2p.
Changed the dialer in the echo example to accept argument for who to dial.
js and go interop
Test of the interopability between js-libp2p and go-libp2p
Fixes pending
How to test
have projects ipfs/js-libp2p-ipfs-nodejs and libp2p/go-libp2p
cloned locally.
In libp2p/go-libp2p:
Copy address from "I am", which in this case is
/ip4/127.0.0.1/tcp/4444/ipfs/QmPbpcZzM2Ac47uA2oebSaDPVbSccGtRFf8rbF4dpNHteN
In ipfs/js-libp2p-ipfs-nodejs:
And in the output of libp2p/go-libp2p, you'll see:
So everything was working in the interop tests!
However
This branch fails with two test failures: