Struct rabble::TcpServerHandler [] [src]

pub struct TcpServerHandler<C, S> where
    C: ConnectionHandler<ClientMsg = S::Msg>,
    S: Serialize
{ /* fields omitted */ }

A service handler for an async TCP server

Methods

impl<'de, C, S> TcpServerHandler<C, S> where
    C: ConnectionHandler<ClientMsg = S::Msg>,
    S: Serialize,
    C::Msg: Serialize + Deserialize<'de> + Clone + Debug
[src]

Create a new TcpServerHandler

Bind to addr and close a connection that hasn't received a message in connection_timeout ms. Note that the connection timeout is optional.

Every request with a CorrelationId is also tracked with a timer. This request_timeout is not optional as every request can potentially fail, or be delayed indefinitely.

Trait Implementations

impl<'de, C, S> ServiceHandler<C::Msg> for TcpServerHandler<C, S> where
    C: ConnectionHandler<ClientMsg = S::Msg>,
    S: Serialize,
    C::Msg: Serialize + Deserialize<'de> + Clone + Debug
[src]

Initialize the state of the handler: Register timers and tcp listen socket

Handle any poll notifications

Handle an envelope from a process or service