From fd739bab4ead9a8f7668af2054a74a76f36a1a55 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sat, 2 Mar 2024 18:40:45 +1000 Subject: [PATCH] Fix WebSocket FAQ entry, typos. --- core/lib/src/lib.rs | 2 +- core/lib/src/lifecycle.rs | 2 +- docs/guide/13-faq.md | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index 5ffee01a..0f6c3871 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -349,7 +349,7 @@ pub fn execute(future: F) -> R async_main(future) } -/// Returns a future that evalutes to `true` exactly when there is a presently +/// Returns a future that evaluates to `true` exactly when there is a presently /// running tokio async runtime that was likely started by Rocket. fn running_within_rocket_async_rt() -> impl std::future::Future { use futures::FutureExt; diff --git a/core/lib/src/lifecycle.rs b/core/lib/src/lifecycle.rs index 1759af5c..8439aac7 100644 --- a/core/lib/src/lifecycle.rs +++ b/core/lib/src/lifecycle.rs @@ -162,7 +162,7 @@ impl Rocket { }; if let Some((proto, io_handler)) = upgrade { - info_!("Attemping upgrade with {proto} I/O handler."); + info_!("Attempting upgrade with {proto} I/O handler."); response.set_status(Status::SwitchingProtocols); response.set_raw_header("Connection", "Upgrade"); response.set_raw_header("Upgrade", proto.to_string()); diff --git a/docs/guide/13-faq.md b/docs/guide/13-faq.md index 223e2740..e4dabca4 100644 --- a/docs/guide/13-faq.md +++ b/docs/guide/13-faq.md @@ -267,13 +267,6 @@ bit simpler, and you may find SSE sufficient for your use-case. For instance, the [chat example] uses SSE to implement a real-time, multiroom chat application. -That being said, Rocket _does_ suport [Server-Sent Events], which allows for -real-time _unidirectional_ communication from the server to the client. This is -often sufficient for many of the applications that WebSockets are typically used -for. For instance, the [chat example] uses SSE to implement a real-time, -multiroom chat application. - -[working on it]: https://github.com/rwf2/Rocket/issues/90 [Server-Sent Events]: @api/master/rocket/response/stream/struct.EventStream.html [chat example]: @git/master/examples/chat {{ endfaq() }}