Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: stream to multiaddr connection converter #2

Merged
merged 2 commits into from
Feb 15, 2020

Conversation

vasco-santos
Copy link
Member

This PR adds the stream to multiaddr connection converter existent on js-libp2p, so that it can be easily used by other libp2p modules

const streamToMaConn = require('../src/stream-to-ma-conn')

describe('Convert stream into a multiaddr connection', () => {
it('converts a stream and adds the provided metadata', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should additionally test streaming data over the returned maConn. It might also be good to verify that ending the underlying stream results in maConn closing properly.

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, conflict needs to be resolved though.

@vasco-santos vasco-santos force-pushed the feat/stream-to-ma-conn-converter branch from 70088d6 to d34c063 Compare February 14, 2020 22:20
@vasco-santos vasco-santos force-pushed the feat/stream-to-ma-conn-converter branch from d34c063 to 013113f Compare February 14, 2020 22:23
@vasco-santos vasco-santos merged commit 6220631 into master Feb 15, 2020
@vasco-santos vasco-santos deleted the feat/stream-to-ma-conn-converter branch February 15, 2020 08:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants