1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

update actix; update examples

This commit is contained in:
Nikolay Kim
2017-10-21 15:21:16 -07:00
parent 0865071dd7
commit 4560ca17b2
10 changed files with 112 additions and 109 deletions

View File

@ -30,12 +30,15 @@ impl Route for MyWebSocket {
}
}
impl ResponseType<ws::Message> for MyWebSocket {
type Item = ();
type Error = ();
}
impl StreamHandler<ws::Message> for MyWebSocket {
fn started(&mut self, ctx: &mut Self::Context) {
println!("WebSocket session openned");
}
impl StreamHandler<ws::Message> for MyWebSocket {}
fn finished(&mut self, ctx: &mut Self::Context) {
println!("WebSocket session closed");
}
}
impl Handler<ws::Message> for MyWebSocket {
fn handle(&mut self, msg: ws::Message, ctx: &mut HttpContext<Self>)