1
0
Fork 0
mirror of https://github.com/tokio-rs/axum.git synced 2025-04-26 13:56:22 +02:00

ws: add read_buffer_size(usize) to WebSocketUpgrade ()

This commit is contained in:
ohaddahan 2025-01-29 13:21:56 +02:00 committed by GitHub
parent 687f014875
commit 0e6e96fb8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -152,6 +152,12 @@ impl<F> std::fmt::Debug for WebSocketUpgrade<F> {
}
impl<F> WebSocketUpgrade<F> {
/// Read buffer capacity. The default value is 128KiB
pub fn read_buffer_size(mut self, size: usize) -> Self {
self.config.read_buffer_size = size;
self
}
/// The target minimum size of the write buffer to reach before writing the data
/// to the underlying stream.
///