Skip to content

Commit

Permalink
exposing read_buffer_size
Browse files Browse the repository at this point in the history
  • Loading branch information
ohaddahan committed Jan 16, 2025
1 parent e09cc59 commit 2e47564
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions axum/src/extract/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit 2e47564

Please sign in to comment.