Updated networking flow (markdown)

Ștefan Talpalaru 2020-03-04 13:52:19 +01:00
parent dfc09268c5
commit 93f3562bb4
1 changed files with 2 additions and 0 deletions

@ -53,3 +53,5 @@ vendor/nim-libp2p/libp2p/multistream.nim:
- awaits Connection.readLp() (without the trailing newline; this header is ignored) - awaits Connection.readLp() (without the trailing newline; this header is ignored)
- if there's a `proto`, awaits Connection.readLp() - if it's the same string as the requested protocol, it returns it - if there's a `proto`, awaits Connection.readLp() - if it's the same string as the requested protocol, it returns it
- if the response was "\n", it tries any other proto in that seq - if the response was "\n", it tries any other proto in that seq
- MultistreamSelect.handle(Connection)
- in a loop: awaits Connection.readLp() for a proto string and if it matches with a MultistreamSelect.handlers instance, it calls HandleHolder.protocol.handler(Connection, proto) - this handler is an LPProtoHandler proc type and it's Switch.upgradeIncoming.securedHandler() or a MuxerProvider.handler() from Switch.muxers