libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.56k stars 273 forks source link

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

Closed mxinden closed 3 years ago

mxinden commented 3 years ago

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.