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