This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathprotocol.puml
69 lines (44 loc) · 2.4 KB
/
protocol.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@startuml
title unisockets Signaling Protocol
actor "External System 1" as e1
participant "Binding Client" as bc
participant "Signaling Server" as ss
participant "Connecting Client" as cc
actor "External System 2" as e2
e1 ->> bc: Opens client
bc ->> ss: Knock(subnet: 127.0.0)
ss -->> bc: Acknowledgement(id: 127.0.0.1, rejected: false)
e1 ->> bc: Binds alias
bc ->> ss: Bind(id: 127.0.0.1, alias: 127.0.0.1:1234)
ss -->> bc: Alias(id: 127.0.0.1, alias: 127.0.0.1:1234, set: true)
e1 ->> bc: Accepts clients
bc ->> ss: Accepting(id: 127.0.0.1, alias: 127.0.0.1:1234)
e2 ->> cc: Opens client
cc ->> ss: Knock(subnet: 127.0.0)
ss -->> cc: Acknowledgement(id: 127.0.0.2, rejected: false)
ss ->> bc: Greeting(offererId: 127.0.0.1, answererId: 127.0.0.2)
bc -->> ss: Offer(offererId: 127.0.0.1, answererId: 127.0.0.2, offer: o1)
ss ->> cc: Offer(offererId: 127.0.0.1, answererId: 127.0.0.2, offer: o1)
cc -->> ss: Answer(offererId: 127.0.0.1, answererId: 127.0.0.2, answer: a1)
ss -->> bc: Answer(offererId: 127.0.0.1, answererId: 127.0.0.2, answer: a1)
bc ->> ss: Candidate(offererId: 127.0.0.1, answererId: 127.0.0.2, candidate: c1)
bc ->> ss: Candidate(offererId: 127.0.0.1, answererId: 127.0.0.2, candidate: c2)
ss ->> cc: Candidate(offererId: 127.0.0.1, answererId: 127.0.0.2, candidate: c1)
ss ->> cc: Candidate(offererId: 127.0.0.1, answererId: 127.0.0.2, candidate: c2)
cc ->> ss: Candidate(offererId: 127.0.0.2, answererId: 127.0.0.1, candidate: c3)
cc ->> ss: Candidate(offererId: 127.0.0.2, answererId: 127.0.0.1, candidate: c4)
ss ->> bc: Candidate(offererId: 127.0.0.2, answererId: 127.0.0.1, candidate: c3)
ss ->> bc: Candidate(offererId: 127.0.0.2, answererId: 127.0.0.1, candidate: c4)
e2 ->> cc: Requests connection
cc ->> ss: Connect(id: 127.0.0.2, clientConnectionId: co1, remoteAlias: 127.0.0.1:1234)
ss -->> cc: Alias(id: 127.0.0.2, alias: 127.0.0.2:0, set: true, clientConnectionId: co1, isConnectionAlias: true)
ss ->> bc: Alias(id: 127.0.0.2, alias: 127.0.0.2:0, set: true)
ss ->> bc: Accept(boundAlias: 127.0.0.1:1234, clientAlias: 127.0.0.2:0)
bc -->> ss: Accepting(id: 127.0.0.1, alias: 127.0.0.1:1234)
ss -->> cc: Alias(id: 127.0.0.1, alias: 127.0.0.1:1234, set: true, clientConnectionId: co1)
note over bc,cc:Handshake complete
e2 ->> cc: Closes or shuts down client
ss ->> bc: Goodbye(id: 127.0.0.2)
ss ->> bc: Alias(id: 127.0.0.2, alias: 127.0.0.2:0, set:false)
note over bc,cc:Removal complete
@enduml