From bf9b81e669f4ce98c8d58df5d776ae90726d7ec2 Mon Sep 17 00:00:00 2001 From: zirkonya Date: Sat, 29 Aug 2026 22:11:23 +0200 Subject: Add transport layer --- src/event/connection.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/event/connection.rs') diff --git a/src/event/connection.rs b/src/event/connection.rs index 99813fd..4af2164 100644 --- a/src/event/connection.rs +++ b/src/event/connection.rs @@ -1,13 +1,19 @@ -use std::net::SocketAddr; - use getset::Getters; -// TODO : identification -// TODO : reason type #[derive(Getters)] -pub struct ConnectionEvent { - #[getset(get = "pub")] - peer_addr: SocketAddr, - #[getset(get = "pub")] - local_addr: SocketAddr, +pub struct ConnectionEvent +where + Uid: PartialEq, +{ + #[get = "pub"] + client_uid: Uid, +} + +impl ConnectionEvent +where + Uid: PartialEq, +{ + pub fn new(uid: Uid) -> Self { + Self { client_uid: uid } + } } -- cgit v1.2.3