-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add signaling message handle functions
- Loading branch information
yngrtc
committed
Jan 7, 2024
1 parent
c481f4a
commit ecd77d7
Showing
5 changed files
with
201 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,4 @@ | ||
use std::cell::RefCell; | ||
use std::collections::HashMap; | ||
use std::rc::Rc; | ||
|
||
pub mod certificate; | ||
pub mod config; | ||
pub mod room; | ||
pub mod states; | ||
|
||
use crate::shared::types::RoomId; | ||
use room::Room; | ||
|
||
pub struct ServerStates { | ||
rooms: RefCell<HashMap<RoomId, Rc<Room>>>, | ||
} | ||
|
||
impl Default for ServerStates { | ||
fn default() -> Self { | ||
Self::new() | ||
} | ||
} | ||
|
||
impl ServerStates { | ||
pub fn new() -> Self { | ||
Self { | ||
rooms: RefCell::new(HashMap::new()), | ||
} | ||
} | ||
} |