pub trait WebSocketRequestHandler: Send + Sync + 'static {
    fn on_session_begin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 Arc<WebSocketSession>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn on_session_end<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 Arc<WebSocketSession>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn clone_handler(&self) -> Box<dyn WebSocketRequestHandler>; fn on_request<'life0, 'async_trait>(
        &'life0 self,
        requestor: Arc<WebSocketRequestManager>,
        cmd: u16,
        content: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Option<Vec<u8>>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } fn process_string_request<'life0, 'async_trait>(
        &'life0 self,
        requestor: Arc<WebSocketRequestManager>,
        cmd: u16,
        content: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Option<Vec<u8>>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } fn on_string_request<'life0, 'async_trait>(
        &'life0 self,
        _requestor: Arc<WebSocketRequestManager>,
        _cmd: u16,
        _content: String
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Option<String>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

Required Methods

Provided Methods

Implementors