Trait websocket_server::EventHandler
[−]
[src]
pub trait EventHandler {
type Id: Send + Sync + Clone + Debug + Display;
fn new() -> Self;
fn main_loop(&self);
fn on_message(&self, id: Self::Id, msg: OwnedMessage);
fn on_connect(
&self,
addr: SocketAddr,
send_channel: SendChannel
) -> Option<Self::Id>;
fn on_disconnect(&self, id: Self::Id);
}
Associated Types
Required Methods
fn new() -> Self
fn main_loop(&self)
fn on_message(&self, id: Self::Id, msg: OwnedMessage)
fn on_connect(
&self,
addr: SocketAddr,
send_channel: SendChannel
) -> Option<Self::Id>
&self,
addr: SocketAddr,
send_channel: SendChannel
) -> Option<Self::Id>