diff options
| author | zirkonya <zirkonya@iridium.lan> | 2026-08-29 22:11:23 +0200 |
|---|---|---|
| committer | zirkonya <zirkonya@iridium.lan> | 2026-08-29 22:11:23 +0200 |
| commit | bf9b81e669f4ce98c8d58df5d776ae90726d7ec2 (patch) | |
| tree | e0d5bdbd8a3423f1303577ddebbfa34696d336bb /src/event/connection.rs | |
| parent | bb41e396aca01fee9f81785681fac0a79d0fd9d8 (diff) | |
Add transport layer
Diffstat (limited to 'src/event/connection.rs')
| -rw-r--r-- | src/event/connection.rs | 24 |
1 files changed, 15 insertions, 9 deletions
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<Uid> +where + Uid: PartialEq, +{ + #[get = "pub"] + client_uid: Uid, +} + +impl<Uid> ConnectionEvent<Uid> +where + Uid: PartialEq, +{ + pub fn new(uid: Uid) -> Self { + Self { client_uid: uid } + } } |
