[][src]Trait tokio_proto::streaming::multiplex::Transport

pub trait Transport<ReadBody>: 'static + Stream<Error = Error> + Sink<SinkError = Error> {
    fn tick(&mut self) { ... }
fn cancel(&mut self, request_id: RequestId) -> Result<()> { ... }
fn poll_write_body(&mut self, id: RequestId) -> Async<()> { ... }
fn dispatching_body(&mut self, id: RequestId, body: &ReadBody) { ... } }

Additional transport details relevant to streaming, multiplexed protocols.

All methods added in this trait have default implementations.

Provided methods

fn tick(&mut self)

Allow the transport to do miscellaneous work (e.g., sending ping-pong messages) that is not directly connected to sending or receiving frames.

This method should be called every time the task using the transport is executing.

fn cancel(&mut self, request_id: RequestId) -> Result<()>

Cancel interest in the exchange identified by RequestId

fn poll_write_body(&mut self, id: RequestId) -> Async<()>

Tests to see if this I/O object may accept a body frame for the given request ID

fn dispatching_body(&mut self, id: RequestId, body: &ReadBody)

Invoked before the multiplexer dispatches the body chunk to the body stream.

Loading content...

Implementations on Foreign Types

impl<T, C, ReadBody> Transport<ReadBody> for Framed<T, C> where
    T: Io + 'static,
    C: Codec + 'static, 
[src]

impl<T, C, ReadBody> Transport<ReadBody> for Framed<T, C> where
    T: AsyncRead + AsyncWrite + 'static,
    C: Encoder<Error = Error> + Decoder<Error = Error> + 'static, 
[src]

Loading content...

Implementors

Loading content...