radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
423 stars 39 forks source link

Retain outgoing uni streams #740

Closed kim closed 3 years ago

kim commented 3 years ago

See message of most recent commit.

_Note: quinn:TransportConfig::max_concurrent_*_streams applies to the remote end, so we can change this to a more restrictive value only after this was rolled out_

alexjg commented 3 years ago

How does this work with the upgrade process and the receive streams? Does it rely on the same stream always being used for the same purpose (i.e the idx argument to borrow_uni always being the same for each stream type)?

kim commented 3 years ago

How does this work with the upgrade process and the receive streams?

They’re unidirectional, and there is no negotiation RTT (anymore).

Does it rely on the same stream always being used for the same purpose (i.e the idx argument to borrow_uni always being the same for each stream type)?

Yes. I looked for typed map implementations, but they weren’t very convincing. Perhaps we can turn the index into Into<usize>, so callers can use an enum.