This commit is contained in:
Maple 2026-01-20 20:26:44 +01:00
commit fc94f655b2
43 changed files with 1957 additions and 694 deletions

View file

@ -1,19 +1,18 @@
use std::sync::Arc;
use std::sync::atomic::AtomicU32;
use rnex_core::common::setup;
use rnex_core::executables::common::{new_simple_backend};
use rnex_core::executables::common::new_simple_backend;
use rnex_core::nex::matchmake::MatchmakeManager;
use rnex_core::nex::remote_console::RemoteConsole;
use rnex_core::nex::user::User;
use rnex_core::rmc::protocols::RemoteInstantiatable;
use rnex_core::rmc::protocols::{RemoteDisconnectable, RmcPureRemoteObject};
use std::sync::Arc;
use std::sync::atomic::AtomicU32;
#[tokio::main]
async fn main() {
setup();
let mmm = Arc::new(MatchmakeManager{
gid_counter: AtomicU32::new(1),
let mmm = Arc::new(MatchmakeManager {
//gid_counter: AtomicU32::new(1),
sessions: Default::default(),
users: Default::default(),
rv_cid_counter: AtomicU32::new(1),
@ -23,15 +22,16 @@ async fn main() {
MatchmakeManager::initialize_garbage_collect_thread(weak_mmm).await;
new_simple_backend(move |c, r|{
new_simple_backend(move |c, r| {
let mmm = mmm.clone();
Arc::new_cyclic(move |this| User{
Arc::new_cyclic(move |this| User {
this: this.clone(),
ip: c.prudpsock_addr,
pid:c.pid,
pid: c.pid,
remote: RemoteConsole::new(r),
matchmake_manager: mmm,
station_url: Default::default()
station_url: Default::default(),
})
}).await;
}
})
.await;
}