docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SequenceHelpers

    Utility class used when dealing with sequenced pipeline stages.

    Inheritance
    object
    SequenceHelpers
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)