From f0dafdf784f21115bcbcfaf31f4b4f500eb17ad5 Mon Sep 17 00:00:00 2001 From: kixelated Date: Thu, 8 Jun 2023 10:08:18 -0700 Subject: [PATCH] Enable BBR. (#22) --- src/app/server.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/server.rs b/src/app/server.rs index 6ee228d..bdbbdd0 100644 --- a/src/app/server.rs +++ b/src/app/server.rs @@ -61,10 +61,14 @@ impl Server { tls_config.alpn_protocols = alpn; let mut server_config = quinn::ServerConfig::with_crypto(sync::Arc::new(tls_config)); + + // Enable BBR congestion control + // TODO validate the implementation let mut transport_config = quinn::TransportConfig::default(); transport_config.keep_alive_interval(Some(time::Duration::from_secs(2))); - server_config.transport = sync::Arc::new(transport_config); + transport_config.congestion_controller_factory(sync::Arc::new(quinn::congestion::BbrConfig::default())); + server_config.transport = sync::Arc::new(transport_config); let server = quinn::Endpoint::server(server_config, config.addr)?; let broadcast = config.broadcast;