mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Create initial multiplayer server skeleton
This commit is contained in:
7
rc_multiplayer/src/traits.rs
Normal file
7
rc_multiplayer/src/traits.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
pub type UserData = ();
|
||||
pub type PacketData = crate::handler::EventData;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait EventCodeHandler: Send + Sync {
|
||||
async fn handle(&self, data: &bytes::Bytes, peer: &mut literustlib_server::Connection<PacketData>, user: &UserData, sender: &literustlib_server::DataSender<PacketData>);
|
||||
}
|
||||
Reference in New Issue
Block a user