webchaussette 1.3.3

Fast, powerful, and easy-to-set-up WebSocket library
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::websocket_types::RequestStruct;

use super::Public;

#[async_trait::async_trait]
pub trait EventHandler: Send + Sync {
    async fn on_join(&self, request: RequestStruct, public: &mut Public);
    async fn on_message(&self, public: &mut Public);
    async fn on_close(&self);
}