mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: uring: reduce buffer sizes
This commit is contained in:
parent
c290062feb
commit
d6f8adcb53
1 changed files with 11 additions and 2 deletions
|
|
@ -34,8 +34,17 @@ use super::storage::PendingScrapeResponseSlab;
|
|||
use super::validator::ConnectionValidator;
|
||||
use super::{create_socket, EXTRA_PACKET_SIZE_IPV4, EXTRA_PACKET_SIZE_IPV6};
|
||||
|
||||
const RESPONSE_BUF_LEN: usize = 8192;
|
||||
const REQUEST_BUF_LEN: usize = 4096;
|
||||
/// Size of each request buffer
|
||||
///
|
||||
/// Enough for scrape request with 20 info hashes
|
||||
const REQUEST_BUF_LEN: usize = 256;
|
||||
|
||||
/// Size of each response buffer
|
||||
///
|
||||
/// Enough for:
|
||||
/// - IPv6 announce response with 112 peers
|
||||
/// - scrape response for 170 info hashes
|
||||
const RESPONSE_BUF_LEN: usize = 2048;
|
||||
|
||||
const USER_DATA_RECV: u64 = u64::MAX;
|
||||
const USER_DATA_PULSE_TIMEOUT: u64 = u64::MAX - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue