Updated networking flow (markdown)
parent
71b2da777f
commit
897f4aaab0
|
@ -45,11 +45,11 @@ vendor/nim-libp2p/libp2p/switch.nim:
|
||||||
|
|
||||||
vendor/nim-libp2p/libp2p/multistream.nim:
|
vendor/nim-libp2p/libp2p/multistream.nim:
|
||||||
|
|
||||||
- MultistreamSelect.select(Connection)
|
|
||||||
- calls MultistreamSelect.select(Connection, "")
|
|
||||||
- MultistreamSelect.select(Connection, proto: string)
|
- MultistreamSelect.select(Connection, proto: string)
|
||||||
- calls MultistreamSelect.select(Connection, @[])
|
- calls MultistreamSelect.select(Connection, @[proto])
|
||||||
- MultistreamSelect.select(Connection, proto: seq[string])
|
- MultistreamSelect.select(Connection, proto: seq[string])
|
||||||
- awaits Connection.write(codec: string)
|
- awaits Connection.write(codec: string)
|
||||||
- if there's a `proto` argument, it awaits Connection.writeLp() - only on the first seq item
|
- if there's a `proto` argument, it awaits Connection.writeLp() - only on the first seq item
|
||||||
- awaits and returns Connection.readLp()
|
- 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 the response was "\n", it tries any other proto in that seq
|
||||||
|
|
Loading…
Reference in New Issue