Trait DMSCWSSessionHandler
Source pub trait DMSCWSSessionHandler: Send + Sync {
// Required methods
fn on_connect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
remote_addr: &'life2 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn on_disconnect<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}