Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-hide get_max_udp_payload_size #2102

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions quinn-proto/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ impl EndpointConfig {
Ok(self)
}

/// Get the current value of `max_udp_payload_size`
///
/// While most parameters don't need to be readable, this must be exposed to allow higher-level
/// layers, e.g. the `quinn` crate, to determine how large a receive buffer to allocate to
/// support an externally-defined `EndpointConfig`.
///
/// While `get_` accessors are typically unidiomatic in Rust, we favor concision for setters,
/// which will be used far more heavily.
#[doc(hidden)]
/// Get the current value of [`max_udp_payload_size`](Self::max_udp_payload_size)
//
// While most parameters don't need to be readable, this must be exposed to allow higher-level
// layers, e.g. the `quinn` crate, to determine how large a receive buffer to allocate to
// support an externally-defined `EndpointConfig`.
//
// While `get_` accessors are typically unidiomatic in Rust, we favor concision for setters,
// which will be used far more heavily.
pub fn get_max_udp_payload_size(&self) -> u64 {
self.max_udp_payload_size.into()
}
Expand Down
Loading