Class SequenceHelpers
Utility class used when dealing with sequenced pipeline stages.
Inherited Members
Namespace: Unity.Networking.Transport.Utilities
Assembly: solution.dll
Syntax
public static class SequenceHelpers
Methods
Name | Description |
---|---|
AbsDistance(ushort, ushort) | Calculate the difference between two sequence IDs, taking integer overflow/underflow into account. For example, both AbsDistance(65535, 0) and AbsDistance(0, 65535) will return 1, not 65535. |
BitMaskToString(uint) | Converts a bitmask integer to a string representation of its binary expression, e.g. a mask value of 4 will return a string with the 3rd bit set: 00000000000000000000000000000100 |
GreaterThan16(ushort, ushort) | Describes whether the non-wrapping difference between two sequenceIDs is less than 2^15 (or 0x8000, or 32768). (The "16" seems to be the 16th bit in a 16-bit integer.) |
IsNewer(uint, uint) | This method was originally added in February 2019, but does not seem to be used anywhere currently. Its original context seems to have been intended for a very simple version of checking whether a packet's sequence ID was equal to or newer than the last received packet. |
LessThan16(ushort, ushort) | Describes whether the non-absolute difference between two sequenceIDs is greater than or equal to 2^15 (or 0x8000, or 32768). (The "16" seems to be the 16th bit in a 16-bit integer.) |
StalePacket(ushort, ushort, ushort) | Describes whether a packet is stale in the context of sequenced pipelines. |