From 28b5e739e58cca9484ac2ba2b99b811d0714cbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Tue, 3 Mar 2020 16:40:18 +0100 Subject: [PATCH] Updated networking flow (markdown) --- networking-flow.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/networking-flow.md b/networking-flow.md index 5cb718b..95efd71 100644 --- a/networking-flow.md +++ b/networking-flow.md @@ -26,8 +26,9 @@ beacon_chain/libp2p_backend.nim: vendor/nim-libp2p/libp2p/switch.nim: - Switch.start() - - for each Switch.transports and each Switch.peerInfo awaits Transport.listen(MultiAddress, inner `handle` closure) - - returns a seq of these futures + - for each Switch.transports and each Switch.peerInfo awaits Transport.listen(MultiAddress, Switch.start.handle) + - (returns a seq of these futures) + - awaits PubSub.start() on Switch.pubSub - Switch.start.handle(Connection) - awaits Switch.upgradeIncoming(Connection) - awaits Connection.close() @@ -40,4 +41,4 @@ vendor/nim-libp2p/libp2p/switch.nim: - Switch.upgradeIncoming.securedHandler(Connection, proto: string) - awaits Secure.secure(Connection) and saves the result in `sconn` - this seems to be the same as `conn` - for each MuxerProvider value in Switch.muxers, calls Multistream.addHandler(MuxerProvider.codec, MuxerProvider) - - awaits Multistream.handle(sconn: Connection) \ No newline at end of file + - awaits Multistream.handle(sconn: Connection)