kubi/kubi-udp/src/common.rs

16 lines
277 B
Rust
Raw Normal View History

2023-02-03 12:36:52 -06:00
use std::num::NonZeroU8;
use bincode::{Encode, Decode};
pub type ClientId = NonZeroU8;
#[derive(Default, Encode, Decode)]
#[repr(u8)]
pub enum DisconnectReason {
#[default]
NotConnected,
ClientDisconnected,
2023-02-04 15:20:19 -06:00
KickedByServer(String),
2023-02-03 12:36:52 -06:00
ClientTimeout,
ServerTimeout,
}