use std::sync::{Arc, Mutex, MutexGuard};
use std::thread::JoinHandle;
#[derive(Clone)]
pub struct ClientPort {
pub port: u16,
pub connected_client_ids: Vec<i32>,
pub handle: Option<Arc<Mutex<JoinHandle<()>>>>
}
impl ClientPort {
pub fn set_handle(&mut self, handle: JoinHandle<()>) {
self.handle = Some(Arc::new(Mutex::new(handle)));
}
}
impl PartialEq for ClientPort {
fn eq(&self, other: &Self) -> bool {
self.port == other.port
}
}