diff --git a/tuic-client/README.md b/tuic-client/README.md index ddb7629..b814a4e 100644 --- a/tuic-client/README.md +++ b/tuic-client/README.md @@ -89,13 +89,13 @@ tuic-client -c PATH/TO/CONFIG // Optional. Maximum number of bytes to transmit to a peer without acknowledgment // Should be set to at least the expected connection latency multiplied by the maximum desired throughput - // Default: 16MiB * 2 - "send_window": 33554432, + // Default: 8MiB * 2 + "send_window": 16777216, // Optional. Maximum number of bytes the peer may transmit without acknowledgement on any one stream before becoming blocked // Should be set to at least the expected connection latency multiplied by the maximum desired throughput - // Default: 16MiB - "receive_window": 16777216, + // Default: 8MiB + "receive_window": 8388608, // Optional. Interval between UDP packet fragment garbage collection // Default: 3s diff --git a/tuic-client/src/config.rs b/tuic-client/src/config.rs index 81f38d5..60a27e9 100644 --- a/tuic-client/src/config.rs +++ b/tuic-client/src/config.rs @@ -197,11 +197,11 @@ mod default { } pub fn send_window() -> u64 { - 2u64.pow(24) * 2 + 8 * 1024 * 1024 * 2 } pub fn receive_window() -> u32 { - 2u32.pow(24) + 8 * 1024 * 1024 } pub fn gc_interval() -> Duration { diff --git a/tuic-server/README.md b/tuic-server/README.md index 2da0a2f..49ac0df 100644 --- a/tuic-server/README.md +++ b/tuic-server/README.md @@ -81,13 +81,13 @@ tuic-server -c PATH/TO/CONFIG // Optional. Maximum number of bytes to transmit to a peer without acknowledgment // Should be set to at least the expected connection latency multiplied by the maximum desired throughput - // Default: 16MiB * 2 - "send_window": 33554432, + // Default: 8MiB * 2 + "send_window": 16777216, // Optional. Maximum number of bytes the peer may transmit without acknowledgement on any one stream before becoming blocked // Should be set to at least the expected connection latency multiplied by the maximum desired throughput - // Default: 16MiB - "receive_window": 16777216, + // Default: 8MiB + "receive_window": 8388608, // Optional. Interval between UDP packet fragment garbage collection // Default: 3s diff --git a/tuic-server/src/config.rs b/tuic-server/src/config.rs index eceee6b..f10f1a7 100644 --- a/tuic-server/src/config.rs +++ b/tuic-server/src/config.rs @@ -161,11 +161,11 @@ mod default { } pub fn send_window() -> u64 { - 2u64.pow(24) * 2 + 8 * 1024 * 1024 * 2 } pub fn receive_window() -> u32 { - 2u32.pow(24) + 8 * 1024 * 1024 } pub fn gc_interval() -> Duration {