mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
fmt
This commit is contained in:
@ -3,9 +3,7 @@
|
||||
//! Open `http://localhost:8080/` in browser to test.
|
||||
|
||||
use actix_files::NamedFile;
|
||||
use actix_web::{
|
||||
middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer, Responder,
|
||||
};
|
||||
use actix_web::{middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer, Responder};
|
||||
use actix_web_actors::ws;
|
||||
|
||||
mod server;
|
||||
|
@ -55,11 +55,7 @@ impl Actor for MyWebSocket {
|
||||
|
||||
/// Handler for `ws::Message`
|
||||
impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for MyWebSocket {
|
||||
fn handle(
|
||||
&mut self,
|
||||
msg: Result<ws::Message, ws::ProtocolError>,
|
||||
ctx: &mut Self::Context,
|
||||
) {
|
||||
fn handle(&mut self, msg: Result<ws::Message, ws::ProtocolError>, ctx: &mut Self::Context) {
|
||||
// process websocket messages
|
||||
println!("WS: {:?}", msg);
|
||||
match msg {
|
||||
|
Reference in New Issue
Block a user