added partial functionality for endpoints

This commit is contained in:
DJMrTV 2025-01-19 15:56:36 +01:00
commit 8aa1fa98d9
6 changed files with 80 additions and 15 deletions

View file

@ -1,3 +1,19 @@
pub struct Endpoint{
use std::net::UdpSocket;
use std::sync::Arc;
use crate::prudp::packet::VirtualPort;
use crate::prudp::server::Connection;
pub struct Endpoint{
socket: Arc<UdpSocket>,
virtual_port: VirtualPort,
}
impl Endpoint{
pub fn get_virual_port(&self) -> VirtualPort{
self.virtual_port
}
fn process_packet(connection: &Connection){
}
}