iroh
iroh copied to clipboard
feat(multipath): add RemoteInfo and ConnectionInfo
Description
- Adds
ConnectionInfo, which is a weak info handle to a connection (does not keep the connection alive, cannot be upgraded to a fullConnection). From aConnectionInfosome static info is directly available, and as long as the connection is alive you can access the connection stats. You can also watch for path changes, and wait for the connection to be closed (without keeping it alive). - Adds functions
remote_infoandremotesto get aRemoteInfoor list of remote all remote infos. - The
RemoteInfoallows to get a list ofConnectionInfothat are currently active - It also allows to watch the currently selected path, replacing
Endpoint::conn_type- We have to think through if this is hindering a potential future where we send on multiple paths in parallel
- If we remove this, you would have to go through all connections, call
ConnectionInfo::paths_info, and check if there is a ip path (-> direct) or only a relay path (-> relayed). - I'm torn a bit if we want this or not. It is a much simpler API, but maybe we shouldn't expose it?
- It also allows to get the RTT of the currently selected path
- Removes
Endpoint::conn_typeandEndpoint::latency
Breaking Changes
Notes & open questions
Change checklist
- [ ] Self-review.
- [ ] Documentation updates following the style guide, if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:
- [ ]
quic-rpc - [ ]
iroh-gossip - [ ]
iroh-blobs - [ ]
dumbpipe - [ ]
sendme
- [ ]