pub struct Received {
pub len: usize,
pub peer: SocketAddr,
pub kernel_rx_s: Option<f64>,
}Expand description
One received datagram: how many bytes, from whom, and — where the kernel provides it — when it actually arrived.
Fields§
§len: usize§peer: SocketAddr§kernel_rx_s: Option<f64>Kernel receive timestamp in Unix seconds, when SO_TIMESTAMPING is
enabled and the stack supplied one.
This is the timestamp that matters for accuracy: it is taken when the packet reaches the kernel, not when userspace happens to be scheduled to read it. The gap between those two is scheduling latency, and on a busy machine it is the single largest error in an otherwise good exchange.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Received
impl RefUnwindSafe for Received
impl Send for Received
impl Sync for Received
impl Unpin for Received
impl UnsafeUnpin for Received
impl UnwindSafe for Received
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more