ws: add read_buffer_size(usize) to WebSocketUpgrade (#3178)

This commit is contained in:
ohaddahan
2025-01-29 06:21:56 -05:00
committed by GitHub
parent 687f014875
commit 0e6e96fb8c
+6
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.
///