User speaking

This commit is contained in:
2026-08-27 01:47:53 +02:00
parent 2bee3c1d32
commit 8887c96f05
3 changed files with 55 additions and 25 deletions
+8 -1
View File
@@ -14,6 +14,7 @@ use tokio::{
net::UdpSocket,
sync::{Mutex, OnceCell},
task::JoinSet,
time::Instant,
};
use crate::{
@@ -22,12 +23,18 @@ use crate::{
types::ClientMeta,
};
pub struct VoiceConnection {
pub addr: SocketAddr,
pub channel_id: String,
pub last_speaking_sent: Instant,
}
pub struct UserConnections {
pub meta: ClientMeta,
pub counter: AtomicU16,
pub public_key: VerifyingKey,
pub connections: Mutex<HashMap<u16, Arc<Mutex<WebSocket>>>>,
pub voice: Mutex<Option<(SocketAddr, String)>>,
pub voice: Mutex<Option<VoiceConnection>>,
}
pub struct Server {