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
(#3178)
This commit is contained in:
parent
687f014875
commit
0e6e96fb8c
1 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue