MCPcopy Create free account
hub / github.com/actix/examples / ChatServer

Class ChatServer

websockets/chat/src/server.rs:71–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69/// Implementation is very naïve.
70#[derive(Debug)]
71pub struct ChatServer {
72 sessions: HashMap<u64, Recipient<Message>>,
73 rooms: HashMap<String, HashSet<u64>>,
74 visitor_count: Arc<AtomicUsize>,
75}
76
77impl ChatServer {
78 pub fn new(visitor_count: Arc<AtomicUsize>) -> ChatServer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected