Struct pnet_transport::Ipv4TransportChannelIterator [−][src]
pub struct Ipv4TransportChannelIterator<'a> { /* fields omitted */ }
Expand description
An iterator over packets of type Ipv4Packet
.
Implementations
impl<'a> Ipv4TransportChannelIterator<'a>
[src]
impl<'a> Ipv4TransportChannelIterator<'a>
[src]pub fn next(&mut self) -> Result<(Ipv4Packet<'_>, IpAddr)>
[src]
pub fn next(&mut self) -> Result<(Ipv4Packet<'_>, IpAddr)>
[src]Get the next (Ipv4Packet
, IpAddr
) pair for the given channel.
pub fn next_with_timeout(
&mut self,
t: Duration
) -> Result<Option<(Ipv4Packet<'_>, IpAddr)>>
[src]
pub fn next_with_timeout(
&mut self,
t: Duration
) -> Result<Option<(Ipv4Packet<'_>, IpAddr)>>
[src]Wait only for a timespan of t
to receive some data, then return. If no data was
received, then Ok(None)
is returned.