mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-17 00:00:16 +02:00
ws: add read_buffer_size(usize) to WebSocketUpgrade (#3178)
This commit is contained in:
@@ -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.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user