Trait cataclysm_ws::WebSocketReader [−][src]
pub trait WebSocketReader: Send {
fn on_message<'life0, 'async_trait>(
&'life0 mut self,
message: Message
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn on_open<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn on_close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}Expand description
Receiving part of web sockets connection
By default, a threaded runner is used to keep the websocket connections alive.
Required methods
Provided methods
On opened connection
This function gets called when the websockets connection is properly stablished.