feat(iroh): Allow customising the TransportConfig for connections #3111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Previously the TransportConfig was hardcoded for the
client (client/server in QUIC terminology: client initiates the
connection, server accepts the connection). This rendered some
customisations on the server-side, as supported by the Builder,
impossible since the client would negotiate different limits.
Specifically the QUIC keep-alives were at a 1s or faster interval
while the connection timeout was at 30s or less.
This adds a new API marked as experimental which allows customising
the transport config for clients.
Secondly it also respects any custom TransportConfig set in the
Builder for clients as well as servers. This is not a behaviour
change since the parameters set by default are now moved to the
Builder and due to how these are negotiated it does not matter that
the server will now also have the same values set by default.
Closes #2872.
Breaking Changes
iroh
If Builder::transport_config is used it will now also affect initiated
connections, while before it only affected the accepted connections.
Notes & open questions
Change checklist