1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add network-layer multiplayer disconnect handling

This commit is contained in:
NG (Graham)
2026-01-07 21:09:38 -05:00
parent 1d0831d307
commit ac9e2a9fcd
10 changed files with 64 additions and 18 deletions

View File

@@ -15,4 +15,9 @@ pub trait RobotMotionHandler: Send + Sync {
async fn handle(&self, data: &bytes::Bytes, user: &UserData);
}
#[async_trait::async_trait]
pub trait DisconnectHandler: Send + Sync {
async fn handle(&self, peer: &std::sync::Arc<literustlib_server::Connection<PacketData>>, user: &UserData);
}
pub trait Broadcastable: byteserde::ser_heap::ByteSerializeHeap + core::any::Any + Send + Sync + 'static {}