pub trait SocketEvents {
// Required methods
fn did_open(&self);
fn did_receive(&self, message: SocketMessage);
fn did_close(&self, code: u16, reason: &str, was_clean: bool);
}Expand description
Receives the events of one socket.
Required Methods§
Sourcefn did_receive(&self, message: SocketMessage)
fn did_receive(&self, message: SocketMessage)
A frame arrived.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".