Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.

Commit 14d3df1

Browse files
committed
misc: clean up diagram
1 parent 3f07259 commit 14d3df1

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

README.md

+21-23
Original file line numberDiff line numberDiff line change
@@ -146,38 +146,36 @@ Both for dialing and listening.
146146
This module is not a transport, however it implements `interface-transport` interface in order to allow circuit to be plugged with `libp2p-swarm`. The rational behind it is that, `libp2p-circuit` has a dial and listen flow, which fits nicely with other transports, moreover, it requires the _raw_ connection to be encrypted and muxed just as a regular transport's connection does. All in all, `interface-transport` ended up being the correct level of abstraction for circuit, as well as allowed us to reuse existing integration points in `libp2p-swarm` and `libp2p` without adding any ad-hoc logic. All parts of `interface-transport` are used, including `.getAddr` which returns a list of `/p2p-circuit` addresses that circuit is currently listening.
147147

148148
```
149-
150149
151150
libp2p libp2p-circuit
152151
+-------------------------------------------------+ +---------------------------------------------------------+
153152
| | | |
154153
| +---------------------------------+ | | |
155154
| | | | | +------------------------+ |
156-
| | | |circuit-relay registers the /hop | | | |
155+
| | | | circuit-relay registers the /hop | | | |
157156
| | libp2p-swarm |<----------------------------------------------------->| circuit-relay | |
158-
| | | |multistream handler with the swarm | | | |
159-
| | | |to handle incomming dial requests | +------------------------+ |
160-
| +---------------------------------+ |from other nodes | transport |
161-
| ^ ^ ^ ^ ^ ^ | | +-------------------------------------------+ |
162-
| | | | | | | | | | +----------------------------------+ | |
163-
| | | | | | | |dialer uses the swarm to dial to a | | | | | |
164-
| | | +--------|--------------------------------------------------------------------->| dialer | | |
165-
| | |transports| | | |relay node listening on the /hop | | | | | |
166-
| | | | | | |multistream endpoint | | +----------------------------------+ | |
167-
| | | | | | | | | | |
168-
| v v v | v | | | | |
169-
|+-----------------------------|-----------------+| | | +----------------------------------+ | |
170-
|| | | || || | | | | | |
171-
||libp2p-tcp |libp2p-ws | ....||libp2p-circuit ||listener registers a /stop multistream | | listener | | |
172-
|| | | +--------------------------------------------------------------------> | | | |
173-
|| | | |plugs in just ||handler with the swarm to handle | | +----------------------------------+ | |
157+
| | | | multistream handler with the swarm | | | |
158+
| | | | to handle incomming dial requests | +------------------------+ |
159+
| +---------------------------------+ | from other nodes | |
160+
| ^ ^ ^ ^ ^ ^ | | +-------------------------------------------+ |
161+
| | | | | | | | | | +----------------------------------+ | |
162+
| | | | | | | | dialer uses the swarm to dial to a | | | | | |
163+
| | | | +------------------------------------------------------------------------------>| dialer | | |
164+
| | |transports | | relay node listening on the /hop | | | | | |
165+
| | | | | | | multistream endpoint | | +----------------------------------+ | |
166+
| | | | | | | | | | |
167+
| v v | v v | | | | |
168+
|+------------------|----------------------------+| | | +----------------------------------+ | |
169+
|| | | | | || | | | | | |
170+
||libp2p-tcp |libp2p-ws | .... |libp2p-circuit ||listener registers a /stop multistream | | listener | | |
171+
|| | +-------------------------------------------------------------------------------->| | | |
172+
|| | | |pluggs in just ||handler with the swarm to handle | | +----------------------------------+ | |
174173
|| | | |as any other ||incomming relay connections | | | |
175174
|| | | |transport || | +-------------------------------------------+ |
176-
|+-----------------------------------------------+| +---------------------------------------------------------+
177-
| |
178-
| |
179-
+-------------------------------------------------+
180-
175+
|+-----------------------------------------------+| | |
176+
| | | |
177+
| | | |
178+
+-------------------------------------------------+ +---------------------------------------------------------+
181179
```
182180
183181

0 commit comments

Comments
 (0)