Initial commit: split VNOX monorepo into VNOX-Server

Unified server binary (vnox-serverd) combining:
- Gateway (TCP, auth, channels, sessions, SQLite)
- Voice-node (UDP relay, Opus, jitter buffer)

Standalone gateway (vnox-gateway) and voice-node (vnox-voice-node) preserved as sub-crates.
This commit is contained in:
Loki 2026-07-09 11:52:56 +02:00
commit e751e0bf5b
94 changed files with 9771 additions and 0 deletions

View file

@ -0,0 +1,22 @@
use anyhow::Result;
use tokio::net::TcpStream;
use tracing::info;
use crate::{domain::channels, net::state::State, proto::SessionCrypto};
use super::{broadcast_leave, set_channel};
pub async fn leave(
_stream: &mut TcpStream,
_seq: &mut u32,
session_id: &str,
channel_id: &str,
_crypto: &SessionCrypto,
state: &State,
) -> Result<()> {
channels::leave(&state.channels, channel_id, session_id).await;
set_channel(state, session_id, None).await;
broadcast_leave(state, channel_id, session_id).await;
info!("session {} left {channel_id}", &session_id[..8]);
Ok(())
}