/// Send all packets from a given iterator and receive all packets
/// according to a given filter.
Send all packets from a given iterator and receive all packets
according to a given filter.
Send all packets from a given iterator and receive all packets according to a given filter .
pub fn sr<G: PacketGenerator>(
        &mut self,
        filter: &str,
        gen: &mut G,
        timeout: u64) -> Result<Vec<Vec<u8>>> {
        self.set_end_indicator(false);
        let thread = try!(self.start_listener(filter, timeout));
        try!(self.send_requests(gen));
        self.set_end_indicator(true);
        match thread.join() {
            Err(_)  => Err(PcapError::from("listener thread panicked")),
            Ok(res) => Ok(res)
        }
    }
pub fn sr < G : PacketGenerator > ( & mut self , filter : & str , gen : & mut G , timeout : u64 ) -> Result < Vec < Vec < u8 > > > { self . set_end_indicator ( false ) ; let thread = try ! ( self start_listener ( filter timeout ) ) ; try ! ( self send_requests ( gen ) ) ; self . set_end_indicator ( true ) ; match thread . join ( ) { Err ( _ ) => Err ( PcapError :: from ( " " ) ) , Ok ( res ) => Ok ( res ) } }
Send all packets from a given iterator and receive all packets
according to a given filter.
Send all packets from a given iterator and receive all packets according to a given filter .
&mut self
filter
&str
gen
&mut G
timeout
u64