From fb749d00a2a70ef1e2a9273882245deccefe0c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Sat, 7 Mar 2020 02:29:27 +0100 Subject: [PATCH] Updated networking flow (markdown) --- networking-flow.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/networking-flow.md b/networking-flow.md index 83904d8..f20a54e 100644 --- a/networking-flow.md +++ b/networking-flow.md @@ -83,6 +83,16 @@ vendor/nim-libp2p/libp2p/switch.nim: - for each MuxerProvider value in Switch.muxers, calls MultistreamSelect.addHandler(MuxerProvider.codec, MuxerProvider) - awaits MultistreamSelect.handle(sconn: Connection) +- Switch.connect(PeerInfo) + - awaits Switch.internalConnect(PeerInfo) + +- Switch.internalConnect(PeerInfo) + - if there is no Connection with the peer in Switch.connections or the existing one is closed, for each Transport in Switch.transports, for each MultiAddress in PeerInfo.addrs, awaits Transport.dial(MultiAddress), then awaits Switch.upgradeOutgoing(Connection) + - awaits Switch.subscribeToPeer(PeerInfo) + +- Switch.subscribeToPeer(PeerInfo) + - awaits PubSub.subscribeToPeer(Connection) + ## multistream vendor/nim-libp2p/libp2p/multistream.nim: