Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connections/simopen: Prefix fake protocol ID with a '/' #321

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Apr 27, 2021

Note this does not target the master branch but the rfc/multistream-simopen
branch.

In order to be backwards compatible with vanilla multistream-select the
simultaneous open extension disguises its identifier as a protocol ID.
According to the protocol negotiation specification protocol IDs can use any
string, though by convention they are prefixed with a '/'.

Each protocol supported by a peer is identified using a unique string called a
protocol id. While any string can be used, the conventional format is a
path-like structure containing a short name and a version number, separated by
/ characters. For example: /mplex/1.0.0 identifies version 1.0.0 of the mplex
stream multiplexing protocol. multistream-select itself has a protocol id of
/multistream/1.0.0.

https://github.com/libp2p/specs/tree/master/connections#protocol-negotiation

This commit replace the iamclient identifier with
/libp2p/simultaneous-connect to comply with the convention.

In order to be backwards compatible with vanilla multistream-select the
simultaneous open extension disguises its identifier as a protocol ID.
According to the protocol negotiation specification protocol IDs can use any
string, though by convention they are prefixed with a '/'.

> Each protocol supported by a peer is identified using a unique string called a
  protocol id. While any string can be used, the conventional format is a
  path-like structure containing a short name and a version number, separated by
  / characters. For example: /mplex/1.0.0 identifies version 1.0.0 of the mplex
  stream multiplexing protocol. multistream-select itself has a protocol id of
  /multistream/1.0.0.

https://github.com/libp2p/specs/tree/master/connections#protocol-negotiation

This commit replace the `iamclient` identifier with
`/libp2p/simultaneous-connect` to comply with the convention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants