mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
keep-alive support
This commit is contained in:
@ -84,6 +84,9 @@ impl Handler<ws::Message> for MyWS {
|
||||
ws::Message::Ping(msg) => ws::WsWriter::pong(ctx, msg),
|
||||
ws::Message::Text(text) => ws::WsWriter::text(ctx, text),
|
||||
ws::Message::Binary(bin) => ws::WsWriter::binary(ctx, bin),
|
||||
ws::Message::Closed | ws::Message::Error => {
|
||||
ctx.stop();
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
Self::empty()
|
||||
|
Reference in New Issue
Block a user