Define wrap-safe snapshot sequencing
This commit is contained in:
@@ -26,3 +26,13 @@ def delivery_for_packet_type(packet_type: str) -> Delivery:
|
||||
|
||||
def is_snapshot_packet(packet_type: str) -> bool:
|
||||
return delivery_for_packet_type(packet_type) is Delivery.UNRELIABLE_SEQUENCED
|
||||
|
||||
|
||||
def requires_application_sequence(packet_type: str) -> bool:
|
||||
"""Return whether the protocol must reject stale copies after reordering.
|
||||
|
||||
GameNetworkingSockets can deliver unreliable messages without retransmit,
|
||||
but the application still owns latest-wins snapshot semantics. Sequence
|
||||
numbers are therefore required for every unreliable snapshot family.
|
||||
"""
|
||||
return is_snapshot_packet(packet_type)
|
||||
|
||||
Reference in New Issue
Block a user