pub fn append_to_cache(
        &mut self,
        dst: SocketAddrV4,
        src_port: u16,
        payload: &[u8],
    ) -> io::Result<()> {
        let key = (src_port, dst);

        // TCP sequence
        let sequence = *self.tcp_sequence_map.get(&key).unwrap_or(&0);

        // Append to cache
        let cache = self
            .tcp_cache2_map
            .entry(key)
            .or_insert_with(|| Cacher::new_expandable(sequence));
        cache.append(payload)?;

        self.send_tcp_ack(dst, src_port)
    }
/// Appends TCP ACK payload to cache.
Appends TCP ACK payload to cache.
Appends TCP ACK payload to cache .
pub fn append_to_cache(
        &mut self,
        dst: SocketAddrV4,
        src_port: u16,
        payload: &[u8],
    ) -> io::Result<()> {
        let key = (src_port, dst);
        // TCP sequence
        let sequence = *self.tcp_sequence_map.get(&key).unwrap_or(&0);
        // Append to cache
        let cache = self
            .tcp_cache2_map
            .entry(key)
            .or_insert_with(|| Cacher::new_expandable(sequence));
        cache.append(payload)?;
        self.send_tcp_ack(dst, src_port)
    }
pub fn append_to_cache ( & mut self , dst : SocketAddrV4 , src_port : u16 , payload : & [ u8 ] , ) -> io :: Result < ( ) > { let key = ( src_port , dst ) ; // TCP sequence let sequence = * self . tcp_sequence_map . get ( & key ) . unwrap_or ( & 0 ) ; // Append to cache let cache = self . tcp_cache2_map . entry ( key ) . or_insert_with ( | | Cacher :: new_expandable ( sequence ) ) ; cache . append ( payload ) ? ; self . send_tcp_ack ( dst , src_port ) }
Appends TCP ACK payload to cache.
Appends TCP ACK payload to cache .
&mut self
dst
SocketAddrV4
src_port
u16
payload
&[u8]