Trait rustun::server::HandleMessage [] [src]

pub trait HandleMessage {
    type Method: Method;
    type Attribute: Attribute;
    type HandleCall: Future<Item=Response<Self::Method, Self::Attribute>, Error=()>;
    type HandleCast: Future<Item=(), Error=()>;
    type Info;
    fn handle_call(&mut self,
                   client: SocketAddr,
                   message: Request<Self::Method, Self::Attribute>)
                   -> Self::HandleCall; fn handle_cast(&mut self,
                   client: SocketAddr,
                   message: Indication<Self::Method, Self::Attribute>)
                   -> Self::HandleCast; fn handle_error(&mut self, client: SocketAddr, error: Error); fn on_init(&mut self,
               info_tx: Sender<Self::Info>,
               indication_tx: IndicationSender) { ... } fn handle_info(&mut self, info: Self::Info) { ... } }

This trait allows to handle transactions issued by clients.

Associated Types

STUN method type that this implementation can handle.

STUN attribute type that this implementation can handle.

Future type for handling request/response transactions.

Future type for handling indication transactions.

Handler specific information message type.

Required Methods

Handles the request/response transaction issued by client.

Handles the indication transaction issued by client.

Handles the error occurred while processing a transaction issued by client.

Provided Methods

Callback method which invoked after the initialization of a server.

Handles the information message.

Implementors