Skip to content

Commit

Permalink
misc/multistream-select: Implement simultaneous open extension
Browse files Browse the repository at this point in the history
From the multistream-select 1.0 simultaneous open protocol extension
specification:

> In order to support direct connections through NATs with hole
punching, we need to account for simultaneous open. In such cases, there
is no single initiator and responder, but instead both peers act as
initiators. This breaks protocol negotiation in multistream-select,
which assumes a single initator.

> This draft proposes a simple extension to the multistream protocol
negotiation in order to select a single initator when both peers are
acting as such.

See libp2p/specs#196 for details.

This commit implements the above specification, available via
`Version::V1SimOpen`.
  • Loading branch information
mxinden committed May 5, 2021
1 parent 5c541a1 commit 5e63a9e
Show file tree
Hide file tree
Showing 6 changed files with 444 additions and 34 deletions.
1 change: 1 addition & 0 deletions misc/multistream-select/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ bytes = "1"
futures = "0.3"
log = "0.4"
pin-project = "1.0.0"
rand = "0.7"
smallvec = "1.6.1"
unsigned-varint = "0.7"

Expand Down
Loading

0 comments on commit 5e63a9e

Please sign in to comment.