Open set_receive_window in public Connection class
@@ -548,6 +548,18 @@ impl Connection {
conn.wake();
}
+ /// Set the maximum number of bytes the peer may transmit across all streams of a connection before
+ /// becoming blocked.
+ ///
+ /// This should be set to at least the expected connection latency multiplied by the maximum
+ /// desired throughput. Larger values can be useful to allow maximum throughput within a
+ /// stream while another is blocked.
+ pub fn set_receive_window(&mut self, receive_window: VarInt) {
+ let mut conn = self.0.lock("set_receive_window");
+ conn.inner.set_receive_window(receive_window);
+ conn.wake();
+ }
+
/// Modify the number of remotely initiated bidirectional streams that may be concurrently open
///
/// No streams may be opened by the peer unless fewer than `count` are already open. Large
