pub fn store_data(&mut self, data: &Vec<u8>, seq: u16, config: &Config) {
        // register new data
        self.last_receive_time = Instant::now();
        // validate if data are within window
        if !self.is_within_window(seq, &config) {
            config.vlog("Not storing data, as they are outside of the window");
            return;
        }
        // store them
        self.parts_received.insert(seq, Clone::clone(data));
        config.vlog(&format!(
            "Connection {} stored {}b of data under seq {}",
            self.static_properties.id,
            data.len(),
            seq
        ));
        // move window if necessary
        while self.parts_received.contains_key(&self.window_position) {
            let new_pos = Wrapping::<u16>(self.window_position) + Wrapping::<u16>(1);
            self.window_position = new_pos.0;
        }
        config.vlog(&format!(
            "Window moved to position {} for connection {}",
            self.window_position,
            self.static_properties.id
        ));
    }
/// Store `data` received from the sender in packet with sequential number `seq` into cache memory.
Store `data` received from the sender in packet with sequential number `seq` into cache memory.
Store ` data ` received from the sender in packet with sequential number ` seq ` into cache memory .
pub fn store_data(&mut self, data: &Vec<u8>, seq: u16, config: &Config) {
        // register new data
        self.last_receive_time = Instant::now();
        // validate if data are within window
        if !self.is_within_window(seq, &config) {
            config.vlog("Not storing data, as they are outside of the window");
            return;
        }
        // store them
        self.parts_received.insert(seq, Clone::clone(data));
        config.vlog(&format!(
            "Connection {} stored {}b of data under seq {}",
            self.static_properties.id,
            data.len(),
            seq
        ));
        // move window if necessary
        while self.parts_received.contains_key(&self.window_position) {
            let new_pos = Wrapping::<u16>(self.window_position) + Wrapping::<u16>(1);
            self.window_position = new_pos.0;
        }
        config.vlog(&format!(
            "Window moved to position {} for connection {}",
            self.window_position,
            self.static_properties.id
        ));
    }
pub fn store_data ( & mut self , data : & Vec < u8 > , seq : u16 , config : & Config ) { // register new data self . last_receive_time = Instant :: now ( ) ; // validate if data are within window if ! self . is_within_window ( seq , & config ) { config . vlog ( " " ) ; return ; } // store them self . parts_received . insert ( seq , Clone :: clone ( data ) ) ; config . vlog ( & format ! ( " " self static_properties id data len ( ) seq ) ) ; // move window if necessary while self . parts_received . contains_key ( & self . window_position ) { let new_pos = Wrapping :: < u16 > ( self . window_position ) + Wrapping :: < u16 > ( 1 ) ; self . window_position = new_pos . 0 ; } config . vlog ( & format ! ( " " self window_position self static_properties id ) ) ; }
Store `data` received from the sender in packet with sequential number `seq` into cache memory.
Store ` data ` received from the sender in packet with sequential number ` seq ` into cache memory .
&mut self
data
&Vec<u8>
seq
u16
config
&Config
&mut self
data
&Vec<u8>
seq
u16
config
&Config