minor changes

This commit is contained in:
godmodegalactus 2024-06-10 18:28:40 +02:00
parent 804c75a7cd
commit ee18f035f1
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
3 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ 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);
config.set_cc_algorithm(quiche::CongestionControlAlgorithm::CUBIC);
config.set_max_ack_delay(maximum_ack_delay);
config.set_ack_delay_exponent(ack_exponent);
config.enable_pacing(false);

View File

@ -41,14 +41,14 @@ pub fn configure_server(quic_parameter: QuicParameters) -> anyhow::Result<quiche
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.set_max_connection_window(128 * 1024 * 1024); // 128 Mbs
config.set_max_connection_window(32 * 1024 * 1024); // 128 Mbs
config.enable_early_data();
config.set_cc_algorithm(quiche::CongestionControlAlgorithm::BBR2);
config.set_cc_algorithm(quiche::CongestionControlAlgorithm::CUBIC);
config.set_active_connection_id_limit(max_number_of_connections);
config.set_max_ack_delay(maximum_ack_delay);
config.set_ack_delay_exponent(ack_exponent);
config.set_initial_congestion_window_packets(1024);
config.set_max_stream_window(256 * 1024 * 1024);
config.enable_pacing(false);
config.set_initial_congestion_window_packets(1024 * 1024);
config.set_max_stream_window(32 * 1024 * 1024);
config.enable_pacing(quic_parameter.enable_pacing);
Ok(config)
}

View File

@ -23,7 +23,7 @@ use quic_geyser_quiche_utils::{
use crate::configure_server::configure_server;
const MAX_BUFFER_SIZE: usize = 65507;
const MAX_MESSAGES_PER_LOOP: usize = 32;
const MAX_MESSAGES_PER_LOOP: usize = 2;
pub struct Client {
pub conn: quiche::Connection,
@ -274,7 +274,7 @@ pub fn server_loop(
loss_rate: 0.0,
max_send_burst: MAX_BUFFER_SIZE,
filters: vec![],
next_stream: 3,
next_stream: 0,
closed: false,
};
@ -417,10 +417,10 @@ pub fn server_loop(
.expect("Message should be serializable in binary");
for id in dispatching_connections.iter() {
let client = clients.get_mut(id).unwrap();
client.next_stream =
get_next_unidi(client.next_stream, true, maximum_concurrent_streams_id);
let stream_id = client.next_stream;
client.next_stream =
get_next_unidi(stream_id, true, maximum_concurrent_streams_id);
if let Err(e) = client.conn.stream_priority(stream_id, priority, true) {
if !client.closed && stop_laggy_client {