From 2de2524dce3fbce2095bb8506422058ed2b2c11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Tue, 3 Mar 2020 16:33:40 +0100 Subject: [PATCH] Updated networking flow (markdown) --- networking-flow.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/networking-flow.md b/networking-flow.md index daab098..5cb718b 100644 --- a/networking-flow.md +++ b/networking-flow.md @@ -32,3 +32,12 @@ vendor/nim-libp2p/libp2p/switch.nim: - awaits Switch.upgradeIncoming(Connection) - awaits Connection.close() - awaits Switch.cleanupConn(Connection) +- Switch.upgradeIncoming(Connection) + - creates a local Multistream instance + - awaits Multistream.select(Connection) + - for each protocol string key in Switch.secureManagers, calls Multistream.addHandler(proto: string, Switch.upgradeIncoming.securedHandler) + - awaits Multistream.handle(Connection) +- 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