Struct fibers_transport::TcpTransporter[][src]

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

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

Methods

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

Starts connecting to the given peer and will return a new TcpTransporter instance if the connect operation is succeeded.

This is equivalent to TcpTransporterBuilder::new().connect(peer).

Makes a new TcpTransporter instance from the given TcpStream.

This is equivalent to TcpTransporterBuilder::new().finish(stream).

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

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

Important traits for TcpStream

Returns a reference to the TCP stream being used by the instance.

Important traits for TcpStream

Returns a mutable reference to the TCP stream 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 TcpTransporter<E, D> where
    E::Item: Debug
[src]

Formats the value using the given formatter. Read more

impl<E: Encode, D: Decode> Transport for TcpTransporter<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> TcpTransport for TcpTransporter<E, D>
[src]

Returns the address of the connected peer.

Returns the address to which the instance is bound.

Auto Trait Implementations

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

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