This commit is contained in:
griffi-gh 2023-02-04 02:47:09 +01:00
parent 78edba4c02
commit da8ca65a3d

View file

@ -17,6 +17,9 @@ pub struct IdClientPacket<T: Encode + Decode>(pub Option<ClientId>, pub ClientPa
#[derive(Encode, Decode)] #[derive(Encode, Decode)]
pub enum ServerPacket<T> where T: Encode + Decode { pub enum ServerPacket<T> where T: Encode + Decode {
Data(T), Data(T),
Connected, Connected(ClientId),
Disconnected, Disconnected,
} }
#[derive(Encode, Decode)]
pub struct IdServerPacket<T: Encode + Decode>(pub Option<ClientId>, pub ServerPacket<T>);