libp2p-exchange-direct
Data Exchange component that uses the swarm to directly dial the taget peer if it is connected
Use-Case
The use case for this exchange component is to allow quick upgrades of a libp2p-circuit connection using transports that require the data-exchange component.
Example
'use strict' const Exchange = const exchangeA = swarmAconst exchangeB = swarmB exchangeAstart {}exchangeBstart {} exchangeB swarmA