kubi/kubi-udp/src/packet.rs
2023-02-02 01:54:12 +01:00

19 lines
306 B
Rust

use bincode::{Encode, Decode};
#[repr(u8)]
#[derive(Encode, Decode)]
pub enum ClientPacket<T> where T: Encode + Decode {
Data(T),
Connect,
Disconnect,
Heartbeat,
}
#[repr(u8)]
#[derive(Encode, Decode)]
pub enum ServerPacket<T> where T: Encode + Decode {
Data(T),
Connected,
Disconnected,
}