Trait actix_web::ws::WsWriter
[−]
[src]
pub trait WsWriter { fn text<T: Into<Binary>>(&mut self, text: T); fn binary<B: Into<Binary>>(&mut self, data: B); fn ping(&mut self, message: &str); fn pong(&mut self, message: &str); fn close(&mut self, reason: Option<CloseReason>); }
Common writing methods for a websocket.
Required Methods
fn text<T: Into<Binary>>(&mut self, text: T)
Send a text
fn binary<B: Into<Binary>>(&mut self, data: B)
Send a binary
fn ping(&mut self, message: &str)
Send a ping message
fn pong(&mut self, message: &str)
Send a pong message
fn close(&mut self, reason: Option<CloseReason>)
Close the connection
Implementors
impl WsWriter for ClientWriter
impl<A, S> WsWriter for WebsocketContext<A, S> where
A: Actor<Context = Self>,
S: 'static,