mirror of
https://github.com/actix/actix-web.git
synced 2024-11-08 18:19:30 +00:00
Fix doc api example
This commit is contained in:
parent
58d1f4a4aa
commit
b5594ae2a5
1 changed files with 5 additions and 5 deletions
|
@ -25,12 +25,12 @@
|
||||||
//!
|
//!
|
||||||
//! // Handler for ws::Message messages
|
//! // Handler for ws::Message messages
|
||||||
//! impl StreamHandler<ws::Message, ws::ProtocolError> for Ws {
|
//! impl StreamHandler<ws::Message, ws::ProtocolError> for Ws {
|
||||||
//! fn handle(&mut self, msg: Result<Option<ws::Message>, ws::ProtocolError>, ctx: &mut Self::Context) {
|
//! fn handle(&mut self, msg: ws::Message, ctx: &mut Self::Context) {
|
||||||
//! match msg {
|
//! match msg {
|
||||||
//! Ok(Some(ws::Message::Ping(msg))) => ctx.pong(&msg),
|
//! ws::Message::Ping(msg) => ctx.pong(&msg),
|
||||||
//! Ok(Some(ws::Message::Text(text))) => ctx.text(text),
|
//! ws::Message::Text(text) => ctx.text(text),
|
||||||
//! Ok(Some(ws::Message::Binary(bin))) => ctx.binary(bin),
|
//! ws::Message::Binary(bin) => ctx.binary(bin),
|
||||||
//! _ => ctx.stop(),
|
//! _ => (),
|
||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
|
|
Loading…
Reference in a new issue