fn add_read_credits(&mut self, credits: u64) -> ShouldTransmit {
        self.local_max_data = self.local_max_data.saturating_add(credits);

        if self.local_max_data > VarInt::MAX.into_inner() {
            return ShouldTransmit(false);
        }

        // Only announce a window update if it's significant enough
        // to make it worthwhile sending a MAX_DATA frame.
        // We use a fraction of the configured connection receive window to make
        // the decision, to accomodate for connection using bigger windows requring
        // less updates.
        let diff = self.local_max_data - self.sent_max_data.into_inner();
        ShouldTransmit(diff >= (self.receive_window / 8))
    }
/// Adds credits to the connection flow control window
///
/// Returns whether a `MAX_DATA` frame should be enqueued as soon as possible.
/// This will only be the case if the window update would is significant
/// enough. As soon as a window update with a `MAX_DATA` frame has been
/// queued, the [`record_sent_max_data`] function should be called to
/// suppress sending further updates until the window increases significantly
/// again.
Adds credits to the connection flow control window
Returns whether a `MAX_DATA` frame should be enqueued as soon as possible.
This will only be the case if the window update would is significant
enough. As soon as a window update with a `MAX_DATA` frame has been
queued, the [`record_sent_max_data`] function should be called to
suppress sending further updates until the window increases significantly
again.
Adds credits to the connection flow control window Returns whether a ` MAX_DATA ` frame should be enqueued as soon as possible . This will only be the case if the window update would is significant enough . As soon as a window update with a ` MAX_DATA ` frame has been queued the [ ` record_sent_max_data ` ] function should be called to suppress sending further updates until the window increases significantly again .
fn add_read_credits(&mut self, credits: u64) -> ShouldTransmit {
        self.local_max_data = self.local_max_data.saturating_add(credits);
        if self.local_max_data > VarInt::MAX.into_inner() {
            return ShouldTransmit(false);
        }
        // Only announce a window update if it's significant enough
        // to make it worthwhile sending a MAX_DATA frame.
        // We use a fraction of the configured connection receive window to make
        // the decision, to accomodate for connection using bigger windows requring
        // less updates.
        let diff = self.local_max_data - self.sent_max_data.into_inner();
        ShouldTransmit(diff >= (self.receive_window / 8))
    }
fn add_read_credits ( & mut self , credits : u64 ) -> ShouldTransmit { self . local_max_data = self . local_max_data . saturating_add ( credits ) ; if self . local_max_data > VarInt :: MAX . into_inner ( ) { return ShouldTransmit ( false ) ; } // Only announce a window update if it's significant enough // to make it worthwhile sending a MAX_DATA frame. // We use a fraction of the configured connection receive window to make // the decision, to accomodate for connection using bigger windows requring // less updates. let diff = self . local_max_data - self . sent_max_data . into_inner ( ) ; ShouldTransmit ( diff >= ( self . receive_window / 8 ) ) }
Adds credits to the connection flow control window
Returns whether a `MAX_DATA` frame should be enqueued as soon as possible.
Adds credits to the connection flow control window Returns whether a ` MAX_DATA ` frame should be enqueued as soon as possible .
&mut self
credits
u64