mirror of
https://github.com/vacp2p/specs.git
synced 2026-01-07 22:44:07 -05:00
Night owls had a hard time reading the diagrams included in these specs. A white background ensures that all text is readable in dark mode as well.
35 lines
984 B
Plaintext
35 lines
984 B
Plaintext
@startuml
|
|
|
|
skinparam backgroundColor white
|
|
|
|
entity Initiator
|
|
entity Responder
|
|
Initiator -> Responder: Open connection
|
|
|
|
== Establish that both sides support multistream-select ==
|
|
|
|
note over Initiator, Responder: Both sides may send initial multistream id simultaneously
|
|
Responder -> Initiator: Send multistream protocol id
|
|
Initiator -> Responder: Send multistream protocol id
|
|
note over Initiator, Responder: If anything other than multistream id is received, abort
|
|
|
|
|
|
== Negotiate protocol to use ==
|
|
|
|
|
|
loop until success, or Initiator gives up and closes channel
|
|
Initiator -> Responder: Send protocol id for desired protocol
|
|
alt protocol is supported by Responder
|
|
Responder -> Initiator: Echo back protocol id to indicate agreement
|
|
else protocol is not supported
|
|
Responder -> Initiator: Send "na" (not available)
|
|
end
|
|
end
|
|
|
|
== Use negotiated protocol ==
|
|
|
|
Initiator -> Responder: Send protocol-specific message
|
|
Responder -> Initiator: Send protocol-specific reply
|
|
|
|
@enduml
|