mirror of
https://github.com/tokio-rs/axum.git
synced 2025-01-11 12:31:25 +01:00
Add chat example documentation. (#85)
This commit is contained in:
parent
a0f6dccc5e
commit
c6b7ad0f33
3 changed files with 13 additions and 0 deletions
|
@ -80,3 +80,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||
|
||||
[package.metadata.playground]
|
||||
features = ["ws"]
|
||||
|
||||
[[example]]
|
||||
name = "chat"
|
||||
required-features = ["ws"]
|
|
@ -15,3 +15,4 @@
|
|||
- [`unix_domain_socket`](../examples/unix_domain_socket.rs) - How to run an Axum server over unix domain sockets.
|
||||
- [`sessions`](../examples/sessions.rs) - Sessions and cookies using [`async-session`](https://crates.io/crates/async-session).
|
||||
- [`tls_rustls`](../examples/tls_rustls.rs) - TLS with [`tokio-rustls`](https://crates.io/crates/tokio-rustls).
|
||||
- [`chat`](../examples/chat.rs) - Chat application example.
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
//! Example chat application.
|
||||
//!
|
||||
//! Run with
|
||||
//!
|
||||
//! ```
|
||||
//! cargo run --features=ws --example chat
|
||||
//! ```
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
|
Loading…
Reference in a new issue