Skip to content

Commit

Permalink
Fix WebSocket FAQ entry, typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored and SergioBenitez committed Mar 4, 2024
1 parent b15dc70 commit fd739ba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ pub fn execute<R, F>(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<Output = bool> {
use futures::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/src/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Rocket<Orbit> {
};

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());
Expand Down
7 changes: 0 additions & 7 deletions docs/guide/13-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down

0 comments on commit fd739ba

Please sign in to comment.