mirror of
https://github.com/vacp2p/specs.git
synced 2026-01-08 23:08:09 -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.
43 lines
11 KiB
XML
43 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="670px" preserveAspectRatio="none" style="width:424px;height:670px;background:#FFFFFF;" version="1.1" viewBox="0 0 424 670" width="424px" zoomAndPan="magnify"><defs><filter height="300%" id="f1t0vpvd8c0val" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f1t0vpvd8c0val)" height="157.5938" style="stroke:#000000;stroke-width:2.0;" width="397" x="10" y="332.0703"/><rect fill="#FFFFFF" filter="url(#f1t0vpvd8c0val)" height="94.8906" style="stroke:#000000;stroke-width:2.0;" width="363" x="20" y="387.7734"/><rect fill="#FFFFFF" height="46.1875" style="stroke:none;stroke-width:1.0;" width="363" x="20" y="436.4766"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="56" x2="56" y1="54.6094" y2="611.7188"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="335" x2="335" y1="54.6094" y2="611.7188"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="46" x="30" y="51.5332">Initiator</text><ellipse cx="56" cy="21" fill="#FEFECE" filter="url(#f1t0vpvd8c0val)" rx="12" ry="12" style="stroke:#A80036;stroke-width:2.0;"/><line style="stroke:#A80036;stroke-width:2.0;" x1="44" x2="68" y1="35" y2="35"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="46" x="30" y="625.252">Initiator</text><ellipse cx="56" cy="644.3281" fill="#FEFECE" filter="url(#f1t0vpvd8c0val)" rx="12" ry="12" style="stroke:#A80036;stroke-width:2.0;"/><line style="stroke:#A80036;stroke-width:2.0;" x1="44" x2="68" y1="658.3281" y2="658.3281"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="297" y="51.5332">Responder</text><ellipse cx="335" cy="21" fill="#FEFECE" filter="url(#f1t0vpvd8c0val)" rx="12" ry="12" style="stroke:#A80036;stroke-width:2.0;"/><line style="stroke:#A80036;stroke-width:2.0;" x1="323" x2="347" y1="35" y2="35"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="297" y="625.252">Responder</text><ellipse cx="335" cy="644.3281" fill="#FEFECE" filter="url(#f1t0vpvd8c0val)" rx="12" ry="12" style="stroke:#A80036;stroke-width:2.0;"/><line style="stroke:#A80036;stroke-width:2.0;" x1="323" x2="347" y1="658.3281" y2="658.3281"/><polygon fill="#A80036" points="323,82.9609,333,86.9609,323,90.9609,327,86.9609" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56" x2="329" y1="86.9609" y2="86.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="98" x="63" y="82.1045">Open connection</text><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="417" x="0" y="116.1367"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="116.1367" y2="116.1367"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="119.1367" y2="119.1367"/><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="24.3516" style="stroke:#000000;stroke-width:2.0;" width="341" x="38" y="104.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="323" x="44" y="122.4561">Establish that both sides support multistream-select</text><path d="M16,144.3125 L16,170.3125 L371,170.3125 L371,154.3125 L361,144.3125 L16,144.3125 " fill="#FBFB77" filter="url(#f1t0vpvd8c0val)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M361,144.3125 L361,154.3125 L371,154.3125 L361,144.3125 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="334" x="22" y="162.8076">Both sides may send initial multistream id simultaneously</text><polygon fill="#A80036" points="67,198.0156,57,202.0156,67,206.0156,63,202.0156" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="61" x2="334" y1="202.0156" y2="202.0156"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="166" x="73" y="197.1592">Send multistream protocol id</text><polygon fill="#A80036" points="323,228.3672,333,232.3672,323,236.3672,327,232.3672" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56" x2="329" y1="232.3672" y2="232.3672"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="166" x="63" y="227.5107">Send multistream protocol id</text><path d="M26,245.3672 L26,271.3672 L364,271.3672 L364,255.3672 L354,245.3672 L26,245.3672 " fill="#FBFB77" filter="url(#f1t0vpvd8c0val)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M354,245.3672 L354,255.3672 L364,255.3672 L354,245.3672 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="309" x="34" y="263.8623">If anything other than multistream id is received, abort</text><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="417" x="0" y="301.8945"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="301.8945" y2="301.8945"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="304.8945" y2="304.8945"/><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="24.3516" style="stroke:#000000;stroke-width:2.0;" width="177" x="120" y="290.7188"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="159" x="126" y="308.2139">Negotiate protocol to use</text><path d="M10,332.0703 L83,332.0703 L83,340.0703 L73,350.0703 L10,350.0703 L10,332.0703 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="157.5938" style="stroke:#000000;stroke-width:2.0;" width="397" x="10" y="332.0703"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="28" x="25" y="346.5654">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="304" x="98" y="345.4893">[until success, or Initiator gives up and closes channel]</text><polygon fill="#A80036" points="323,368.7734,333,372.7734,323,376.7734,327,372.7734" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56" x2="329" y1="372.7734" y2="372.7734"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="208" x="63" y="367.917">Send protocol id for desired protocol</text><path d="M20,387.7734 L81,387.7734 L81,395.7734 L71,405.7734 L20,405.7734 L20,387.7734 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="94.8906" style="stroke:#000000;stroke-width:2.0;" width="363" x="20" y="387.7734"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="35" y="402.2686">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="208" x="96" y="401.1924">[protocol is supported by Responder]</text><polygon fill="#A80036" points="67,424.4766,57,428.4766,67,432.4766,63,428.4766" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="61" x2="334" y1="428.4766" y2="428.4766"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="255" x="73" y="423.6201">Echo back protocol id to indicate agreement</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="20" x2="383" y1="437.4766" y2="437.4766"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="149" x="25" y="448.8955">[protocol is not supported]</text><polygon fill="#A80036" points="67,470.6641,57,474.6641,67,478.6641,63,474.6641" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="61" x2="334" y1="474.6641" y2="474.6641"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="141" x="73" y="469.8076">Send "na" (not available)</text><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="417" x="0" y="517.8398"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="517.8398" y2="517.8398"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="417" y1="520.8398" y2="520.8398"/><rect fill="#EEEEEE" filter="url(#f1t0vpvd8c0val)" height="24.3516" style="stroke:#000000;stroke-width:2.0;" width="169" x="124" y="506.6641"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="151" x="130" y="524.1592">Use negotiated protocol</text><polygon fill="#A80036" points="323,559.3672,333,563.3672,323,567.3672,327,563.3672" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56" x2="329" y1="563.3672" y2="563.3672"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="185" x="63" y="558.5107">Send protocol-specific message</text><polygon fill="#A80036" points="67,589.7188,57,593.7188,67,597.7188,63,593.7188" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="61" x2="334" y1="593.7188" y2="593.7188"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="160" x="73" y="588.8623">Send protocol-specific reply</text><!--MD5=[94fe0c47255b614b966958d87b31961a]
|
|
@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
|
|
|
|
PlantUML version 1.2022.0(Tue Jan 11 17:16:42 CET 2022)
|
|
(GPL source distribution)
|
|
Java Runtime: Java(TM) SE Runtime Environment
|
|
JVM: Java HotSpot(TM) 64-Bit Server VM
|
|
Default Encoding: Cp1252
|
|
Language: de
|
|
Country: DE
|
|
--></g></svg> |