initial commit

This commit is contained in:
DJMrTV 2025-01-19 13:02:15 +01:00
commit 0ed05f6116
15 changed files with 645 additions and 0 deletions

42
src/prudp/server.rs Normal file
View file

@ -0,0 +1,42 @@
use std::marker::PhantomData;
use std::ops::{Deref, DerefMut};
use std::sync::{Arc, Mutex};
use crate::prudp::endpoint::Endpoint;
pub struct NexServer{
pub endpoints: Mutex<Vec<Endpoint>>,
_no_outside_construction: PhantomData<()>
}
impl NexServer{
fn server_thread_entry(){
}
pub fn new() -> Arc<Self>{
let own_impl = NexServer{
endpoints: Default::default(),
_no_outside_construction: Default::default()
};
let arc = Arc::new(own_impl);
}
}
#[cfg(test)]
mod test{
use std::ops::Deref;
use std::sync::Arc;
use crate::prudp::server::{NexServer};
#[test]
fn test(){
let server = NexServer::new();
let a = (server.deref()).clone();
}
}