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