Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

feat: consolidate select write #53

Merged
merged 4 commits into from
Sep 26, 2019
Merged

feat: consolidate select write #53

merged 4 commits into from
Sep 26, 2019

Conversation

jacobheun
Copy link
Contributor

This consolidates the select write so that the multistream protocol and the first select protocol are sent in the same packet. This saves a round trip.

Ideally, we would also add a small delay before replying to the select response to do the same action when responding, but I am saving that for a separate PR.

I also updated some logs to make it easier to understand what's going on. Using this on the libp2p core refactor I was having a hard time understanding the order of the log messages.

I took the to-reader-writer logic and created it-handshake based off of that, as we will need support for this in other modules.

src/select.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

Can you remove the package-lock?

Looks it was added in the previous PR

@jacobheun
Copy link
Contributor Author

Added changes per feedback including package lock removal. I also bumped the dependencies of the newly released modules.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM!

@jacobheun jacobheun merged commit e866e1d into master Sep 26, 2019
@jacobheun jacobheun deleted the feat/improvements branch September 26, 2019 14:37
jacobheun added a commit that referenced this pull request Oct 10, 2019
* chore: update deps
* chore: remove package lock
jacobheun added a commit that referenced this pull request Oct 10, 2019
* chore: update deps
* chore: remove package lock
jacobheun added a commit that referenced this pull request Oct 11, 2019
* refactor: use async / await (#52)

BREAKING CHANGE: The API has changed from callbacks to async/await. Additionally, the use has changed. See the README for usage guidance.

* feat: consolidate select write (#53)

* chore: update deps
* chore: remove package lock

* chore: update contributors

* chore: release version v0.15.0

* chore: fix contributors
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