pub fn poll_transmit(&mut self, max_len: usize) -> Range<u64> {
        if let Some(range) = self.retransmits.pop_min() {
            // Retransmit sent data
            let end = range.end.min((max_len as u64).saturating_add(range.start));
            if end != range.end {
                self.retransmits.insert(end..range.end);
            }
            return range.start..end;
        }
        // Transmit new data
        let end = self
            .offset
            .min((max_len as u64).saturating_add(self.unsent));
        let result = self.unsent..end;
        self.unsent = end;
        result
    }
/// Compute the next range to transmit on this stream and update state to account for that
/// transmission
Compute the next range to transmit on this stream and update state to account for that
transmission
Compute the next range to transmit on this stream and update state to account for that transmission
pub fn poll_transmit(&mut self, max_len: usize) -> Range<u64> {
        if let Some(range) = self.retransmits.pop_min() {
            // Retransmit sent data
            let end = range.end.min((max_len as u64).saturating_add(range.start));
            if end != range.end {
                self.retransmits.insert(end..range.end);
            }
            return range.start..end;
        }
        // Transmit new data
        let end = self
            .offset
            .min((max_len as u64).saturating_add(self.unsent));
        let result = self.unsent..end;
        self.unsent = end;
        result
    }
pub fn poll_transmit ( & mut self , max_len : usize ) -> Range < u64 > { if let Some ( range ) = self . retransmits . pop_min ( ) { // Retransmit sent data let end = range . end . min ( ( max_len as u64 ) . saturating_add ( range . start ) ) ; if end != range . end { self . retransmits . insert ( end .. range . end ) ; } return range . start .. end ; } // Transmit new data let end = self . offset . min ( ( max_len as u64 ) . saturating_add ( self . unsent ) ) ; let result = self . unsent .. end ; self . unsent = end ; result }
Compute the next range to transmit on this stream and update state to account for that
transmission
Compute the next range to transmit on this stream and update state to account for that transmission
&mut self
max_len
usize