fn handle_skip(&mut self, direction: u8, input_size: u32) -> u32 {
        let mut skip_left = if direction == STREAM_TOSERVER {
            self.skip_ts
        } else {
            self.skip_tc
        };
        if skip_left == 0 {
            return 0
        }
        debug!("skip_left {} input_size {}", skip_left, input_size);

        let consumed = if skip_left >= input_size {
            input_size
        } else {
            skip_left
        };

        if skip_left <= input_size {
            skip_left = 0;
        } else {
            skip_left -= input_size;
        }

        if direction == STREAM_TOSERVER {
            self.skip_ts = skip_left;
        } else {
            self.skip_tc = skip_left;
        }
        return consumed;
    }
// return how much data we consumed
return how much data we consumed
return how much data we consumed
fn handle_skip(&mut self, direction: u8, input_size: u32) -> u32 {
        let mut skip_left = if direction == STREAM_TOSERVER {
            self.skip_ts
        } else {
            self.skip_tc
        };
        if skip_left == 0 {
            return 0
        }
        debug!("skip_left {} input_size {}", skip_left, input_size);
        let consumed = if skip_left >= input_size {
            input_size
        } else {
            skip_left
        };
        if skip_left <= input_size {
            skip_left = 0;
        } else {
            skip_left -= input_size;
        }
        if direction == STREAM_TOSERVER {
            self.skip_ts = skip_left;
        } else {
            self.skip_tc = skip_left;
        }
        return consumed;
    }
fn handle_skip ( & mut self , direction : u8 , input_size : u32 ) -> u32 { let mut skip_left = if direction == STREAM_TOSERVER { self . skip_ts } else { self . skip_tc } ; if skip_left == 0 { return 0 } debug ! ( " " skip_left input_size ) ; let consumed = if skip_left >= input_size { input_size } else { skip_left } ; if skip_left <= input_size { skip_left = 0 ; } else { skip_left -= input_size ; } if direction == STREAM_TOSERVER { self . skip_ts = skip_left ; } else { self . skip_tc = skip_left ; } return consumed ; }
return how much data we consumed
return how much data we consumed
&mut self
direction
u8
input_size
u32
&mut self
direction
u8
input_size
u32