changing some default config and congestion control alogrithm

This commit is contained in:
godmodegalactus 2024-05-24 21:28:17 +02:00
parent 4cbfb3ebf8
commit 0670a2e23e
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@ use crate::quic::configure_server::ALPN_GEYSER_PROTOCOL_ID;
use super::configure_server::MAX_DATAGRAM_SIZE;
pub const DEFAULT_MAX_STREAMS: u64 = 64 * 1024;
pub const DEFAULT_MAX_RECIEVE_WINDOW_SIZE: u64 = 64_000_000; // 64 MBs
pub const DEFAULT_MAX_RECIEVE_WINDOW_SIZE: u64 = 1_000_000; // 64 MBs
pub fn configure_client(
maximum_concurrent_streams: u64,
@ -25,5 +25,6 @@ pub fn configure_client(
config.set_initial_max_streams_bidi(maximum_concurrent_streams);
config.set_initial_max_streams_uni(maximum_concurrent_streams);
config.set_disable_active_migration(true);
config.set_cc_algorithm(quiche::CongestionControlAlgorithm::BBR2);
Ok(config)
}

View File

@ -30,12 +30,13 @@ pub fn configure_server(
config.set_max_recv_udp_payload_size(MAX_DATAGRAM_SIZE);
config.set_max_send_udp_payload_size(MAX_DATAGRAM_SIZE);
config.set_initial_max_data(recieve_window_size);
config.set_initial_max_stream_data_bidi_local(recieve_window_size);
config.set_initial_max_stream_data_bidi_remote(recieve_window_size);
config.set_initial_max_stream_data_bidi_local(2048);
config.set_initial_max_stream_data_bidi_remote(2048);
config.set_initial_max_stream_data_uni(recieve_window_size);
config.set_initial_max_streams_bidi(max_concurrent_streams);
config.set_initial_max_streams_uni(max_concurrent_streams);
config.set_disable_active_migration(true);
config.enable_early_data();
config.set_cc_algorithm(quiche::CongestionControlAlgorithm::BBR2);
Ok(config)
}