From 5269e43b8e0e994426e9de831ccea56bb2571256 Mon Sep 17 00:00:00 2001 From: kostasgr100 <97601678+kostasgr100@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:22:04 +0200 Subject: [PATCH] Update echo_ws.rs --- examples/echo_ws.rs | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/echo_ws.rs b/examples/echo_ws.rs index e82cc09..9aff93e 100644 --- a/examples/echo_ws.rs +++ b/examples/echo_ws.rs @@ -20,29 +20,29 @@ fn main() { ssl_prefer_low_memory_usage: None, }; - let mut app = App::new(opts, None); - let compressor: u32 = CompressOptions::SharedCompressor.into(); - let decompressor: u32 = CompressOptions::SharedDecompressor.into(); - let route_settings = WsRouteSettings { - compression: Some(compressor | decompressor), - max_payload_length: Some(1024), - idle_timeout: Some(800), - max_backpressure: Some(10), - close_on_backpressure_limit: Some(false), - reset_idle_timeout_on_send: Some(true), - send_pings_automatically: Some(true), - max_lifetime: Some(111), - }; + let mut app = App::new(opts, None); + let compressor: u32 = CompressOptions::SharedCompressor.into(); + let decompressor: u32 = CompressOptions::SharedDecompressor.into(); + let route_settings = WsRouteSettings { + compression: Some(compressor | decompressor), + max_payload_length: Some(1024), + idle_timeout: Some(800), + max_backpressure: Some(10), + close_on_backpressure_limit: Some(false), + reset_idle_timeout_on_send: Some(true), + send_pings_automatically: Some(true), + max_lifetime: Some(111), + }; - app.ws( - "/", - route_settings.clone(), - handler_ws, - HttpConnection::default_upgrade, - ) - .listen(9001, None::) - .run(); - println!("Server exiting"); + app.ws( + "/", + route_settings.clone(), + handler_ws, + HttpConnection::default_upgrade, + ) + .listen(9001, None::) + .run(); + println!("Server exiting"); } async fn handler_ws(mut ws: Websocket) {