You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the endpoint builder preferring completely static types, it makes it difficult to swap implementations of providers based on config:
let builder = if use_bbr {
build.with_congestion_controller(congestion_controller::Bbr::default())?
}else{
build.with_congestion_controller(congestion_controller::Cubic::default())?
};
Solution:
To make this pattern easier, we can provide an enum impl that is implemented generically for two different CCAs and dispatches at runtime:
The application would then be able to switch at runtime:
let builder = if use_bbr {
build.with_congestion_controller(Either::Left(congestion_controller::Bbr::default()))?
}else{
build.with_congestion_controller(Either::Right(congestion_controller::Cubic::default()))?
};
It might make sense to use the either crate, or just define our own in s2n-quic-core to avoid the dependency.
The text was updated successfully, but these errors were encountered:
#2078
Problem:
Due to the endpoint builder preferring completely static types, it makes it difficult to swap implementations of providers based on config:
Solution:
To make this pattern easier, we can provide an enum impl that is implemented generically for two different CCAs and dispatches at runtime:
The application would then be able to switch at runtime:
It might make sense to use the either crate, or just define our own in
s2n-quic-core
to avoid the dependency.The text was updated successfully, but these errors were encountered: