pub enum Event {
Connected(PlayerHandle),
Synchronizing {
player: PlayerHandle,
count: u8,
total: u8,
},
Synchronized(PlayerHandle),
Running,
Disconnected(PlayerHandle),
TimeSync {
frames_ahead: u8,
},
ConnectionInterrupted {
player: PlayerHandle,
disconnect_timeout: Duration,
},
ConnectionResumed(PlayerHandle),
}Expand description
Event that occurs during the course of a session.
Variants§
Connected(PlayerHandle)
A initial response packet from the remote player has been recieved.
Synchronizing
A response from a remote player has been recieved during the initial synchronization handshake.
Synchronized(PlayerHandle)
The initial synchronization handshake has been completed. The connection is considered live now.
Running
All remote peers are now synchronized, the session is can now start running.
Disconnected(PlayerHandle)
The connection with a remote player has been disconnected.
TimeSync
The local client is several frames ahead of all other peers. Might need to stall a few frames to allow others to catch up.
ConnectionInterrupted
The connection with a remote player has been temporarily interrupted.
ConnectionResumed(PlayerHandle)
The connection with a remote player has been resumed after being interrupted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more