[][src]Struct pnet_transport::TransportSender

pub struct TransportSender {
    pub socket: Arc<FileDesc>,
    // some fields omitted
}

Structure used for sending at the transport layer. Should be created with transport_channel().

Fields

socket: Arc<FileDesc>

Methods

impl TransportSender[src]

pub fn send_to<T: Packet>(
    &mut self,
    packet: T,
    destination: IpAddr
) -> Result<usize>
[src]

Send a packet to the provided destination.

pub fn set_ttl(&mut self, time_to_live: u8) -> Result<()>[src]

Sets a time-to-live on the socket, which then applies for all packets sent.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.