aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/interaction/shared.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-12 01:28:50 +0000
committerFuwn <[email protected]>2024-06-12 01:28:50 +0000
commit2f824aaa357a74390bff6410c4b0b3295162105e (patch)
treedd94a9553112165d9e3835862cb45a6d1ac75499 /crates/whirl_server/src/interaction/shared.rs
parentrefactor(crates): update idioms (diff)
downloadwhirl-2f824aaa357a74390bff6410c4b0b3295162105e.tar.xz
whirl-2f824aaa357a74390bff6410c4b0b3295162105e.zip
feat(whirl_server): short object id sending
Diffstat (limited to 'crates/whirl_server/src/interaction/shared.rs')
-rw-r--r--crates/whirl_server/src/interaction/shared.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/whirl_server/src/interaction/shared.rs b/crates/whirl_server/src/interaction/shared.rs
index 4e1d158..d59fa2f 100644
--- a/crates/whirl_server/src/interaction/shared.rs
+++ b/crates/whirl_server/src/interaction/shared.rs
@@ -1,13 +1,17 @@
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only
-use {bytes::BytesMut, std::collections::HashMap};
+use {
+ crate::cmd::commands::register_object_id::RegisterObjectId, bytes::BytesMut,
+ std::collections::HashMap,
+};
pub struct Shared {
- pub peers: HashMap<String, tokio::sync::mpsc::UnboundedSender<BytesMut>>,
+ pub peers: HashMap<String, tokio::sync::mpsc::UnboundedSender<BytesMut>>,
+ pub object_ids: Vec<RegisterObjectId>,
}
impl Shared {
- pub fn new() -> Self { Self { peers: HashMap::new() } }
+ pub fn new() -> Self { Self { peers: HashMap::new(), object_ids: vec![] } }
#[allow(clippy::unused_async)]
pub async fn broadcast(&mut self, message: &[u8]) {