pub trait SessionFacadeHandler {
// Provided methods
fn on_connect<'a>(
&'a mut self,
_session_id: SessionId,
_addr: IpAddr,
_port: u16,
_client_guid: u64,
) -> ServerHookFuture<'a> { ... }
fn on_disconnect<'a>(
&'a mut self,
_session_id: SessionId,
_reason: PeerDisconnectReason,
) -> ServerHookFuture<'a> { ... }
fn on_packet<'a>(
&'a mut self,
_session_id: SessionId,
_payload: Bytes,
) -> ServerHookFuture<'a> { ... }
fn on_ack<'a>(
&'a mut self,
_session_id: SessionId,
_receipt_id: u64,
) -> ServerHookFuture<'a> { ... }
fn on_metrics<'a>(
&'a mut self,
_shard_id: usize,
_snapshot: TransportMetricsSnapshot,
_dropped_non_critical_events: u64,
) -> ServerHookFuture<'a> { ... }
}Expand description
Session-id based callback surface.
Use this when your application prefers integer session ids over PeerId.