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

Class Join

websockets/chat/src/server.rs:59–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 rooms: HashMap<String, HashSet<u64>>,
58 visitor_count: Arc<AtomicUsize>,
59}
60
61impl ChatState {
62 pub fn new(visitor_count: Arc<AtomicUsize>) -> ChatState {
63 // default room
64 let mut rooms = HashMap::new();
65 rooms.insert("main".to_owned(), HashSet::new());
66
67 ChatState {
68 sessions: HashMap::new(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected