pub enum GgrsEvent<T>where
T: Config,{
Synchronizing {
addr: T::Address,
total: u32,
count: u32,
},
Synchronized {
addr: T::Address,
},
Disconnected {
addr: T::Address,
},
NetworkInterrupted {
addr: T::Address,
disconnect_timeout: u128,
},
NetworkResumed {
addr: T::Address,
},
WaitRecommendation {
skip_frames: u32,
},
DesyncDetected {
frame: Frame,
local_checksum: u128,
remote_checksum: u128,
addr: T::Address,
},
}
Expand description
Notifications that you can receive from the session. Handling them is up to the user.
Variants§
Synchronizing
Fields
The session made progress in synchronizing. After total
roundtrips, the session are synchronized.
Synchronized
The session is now synchronized with the remote client.
Disconnected
The remote client has disconnected.
NetworkInterrupted
Fields
The session has not received packets from the remote client for some time and will disconnect the remote in disconnect_timeout
ms.
NetworkResumed
Sent only after a GgrsEvent::NetworkInterrupted
event, if communication with that player has resumed.
WaitRecommendation
Fields
Sent out if GGRS recommends skipping a few frames to let clients catch up. If you receive this, consider waiting skip_frames
number of frames.
DesyncDetected
Fields
Sent whenever GGRS locally detected a discrepancy between local and remote checksums
Trait Implementations§
source§impl<T> PartialEq for GgrsEvent<T>
impl<T> PartialEq for GgrsEvent<T>
impl<T> Copy for GgrsEvent<T>
impl<T> Eq for GgrsEvent<T>
impl<T> StructuralPartialEq for GgrsEvent<T>where
T: Config,
Auto Trait Implementations§
impl<T> RefUnwindSafe for GgrsEvent<T>
impl<T> Send for GgrsEvent<T>
impl<T> Sync for GgrsEvent<T>
impl<T> Unpin for GgrsEvent<T>
impl<T> UnwindSafe for GgrsEvent<T>
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