Files
specs/connections/multistream.plantuml
Kevin 0c40ec8856 *: Set PlantUML background color to white (#419)
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.
2022-05-29 16:17:52 +02:00

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