Struct fibers_transport::UdpTransporter[][src]

pub struct UdpTransporter<E: Encode, D: Decode> { /* fields omitted */ }

An implementation of Transport that uses UDP as the transport layer.

Methods

impl<E, D> UdpTransporter<E, D> where
    E: Encode + Default,
    D: Decode + Default
[src]

Starts binding to the specified address and will makes a new UdpTransporter instance if the operation is succeeded.

This is equivalent to UdpTransporterBuilder::new().bind(addr).

Makes a new UdpTransporter instance from the given UdpSocket.

This is equivalent to UdpTransporterBuilder::new().finish(socket).

impl<E: Encode, D: Decode> UdpTransporter<E, D>
[src]

Returns the number of unsent messages in the queue of the instance.

Returns a reference to the UDP socket being used by the instance.

Returns a mutable reference to the UDP socket being used by the instance.

Important traits for &'a mut R

Returns a reference to the decoder being used by the instance.

Important traits for &'a mut R

Returns a mutable reference to the decoder being used by the instance.

Important traits for &'a mut R

Returns a reference to the encoder being used by the instance.

Important traits for &'a mut R

Returns a mutable reference to the encoder being used by the instance.

Trait Implementations

impl<E: Debug + Encode, D: Debug + Decode> Debug for UdpTransporter<E, D> where
    E::Item: Debug
[src]

Formats the value using the given formatter. Read more

impl<E: Encode, D: Decode> Transport for UdpTransporter<E, D>
[src]

Peer address.

Outgoing item.

Incoming item.

Starts sending the given item to the destination peer.

Polls the transmission of the all outstanding items in the transporter have been completed. Read more

Polls reception of an item from a peer. Read more

impl<E: Encode, D: Decode> UdpTransport for UdpTransporter<E, D>
[src]

Returns the address to which the instance is bound.

Auto Trait Implementations

impl<E, D> Send for UdpTransporter<E, D> where
    D: Send,
    E: Send,
    <E as Encode>::Item: Send

impl<E, D> !Sync for UdpTransporter<E, D>