Struct rustun::rfc5389::handlers::BindingHandler
[−]
[src]
pub struct BindingHandler { /* fields omitted */ }
A HandleMessage
implementation which only handle Binding
method.
Methods
impl BindingHandler
[src]
fn new() -> Self
Makes a new BindingHandler
instance.
fn with_logger(logger: Logger) -> Self
Makes a new BindingHandler
instance with the speficied logger.
The logger is used for logging errors that ocurred while handling transactions.
Trait Implementations
impl Debug for BindingHandler
[src]
impl HandleMessage for BindingHandler
[src]
type Method = Binding
STUN method type that this implementation can handle.
type Attribute = Attribute
STUN attribute type that this implementation can handle.
type HandleCall = BoxFuture<Response<Self::Method, Self::Attribute>, ()>
Future
type for handling request/response transactions.
type HandleCast = BoxFuture<(), ()>
Future
type for handling indication transactions.
type Info = ()
Handler specific information message type.
fn handle_call(&mut self,
client: SocketAddr,
request: Request<Self::Method, Self::Attribute>)
-> Self::HandleCall
client: SocketAddr,
request: Request<Self::Method, Self::Attribute>)
-> Self::HandleCall
Handles the request/response transaction issued by client
.
fn handle_cast(&mut self,
_client: SocketAddr,
_message: Indication<Self::Method, Self::Attribute>)
-> Self::HandleCast
_client: SocketAddr,
_message: Indication<Self::Method, Self::Attribute>)
-> Self::HandleCast
Handles the indication transaction issued by client
.
fn handle_error(&mut self, client: SocketAddr, error: Error)
Handles the error occurred while processing a transaction issued by client
.
fn on_init(&mut self,
info_tx: Sender<Self::Info>,
indication_tx: IndicationSender)
info_tx: Sender<Self::Info>,
indication_tx: IndicationSender)
Callback method which invoked after the initialization of a server.
fn handle_info(&mut self, info: Self::Info)
Handles the information message.