servers/src/lib.rs

17 lines
418 B
Rust
Raw Permalink Normal View History

use std::{collections::HashMap, sync::Mutex};
2022-06-17 11:43:23 +00:00
use lazy_static::lazy_static;
2022-08-12 21:12:29 +00:00
use crate::server::Client;
pub mod commands;
pub mod plugins;
2022-08-12 21:12:29 +00:00
pub mod server;
lazy_static! {
2022-08-12 21:12:29 +00:00
/// List with all connected clients
pub static ref CLIENTS: Mutex<HashMap<usize, Client>> = Mutex::new(HashMap::new());
2022-08-12 21:12:29 +00:00
/// Next ID of the client to be add to [CLIENTS]
pub static ref CLIENT_NEXT: Mutex<usize> = Mutex::new(0);
}