docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PacketsQueue

    A queue of packets with an internal pool of preallocated packet buffers.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Networking.Transport
    Assembly: solution.dll
    Syntax
    public struct PacketsQueue : IDisposable

    Properties

    Name Description
    Capacity

    Total capacity of the queue.

    Count

    Number of packets currently in the queue.

    IsCreated

    Whether the queue has been created or not.

    this[int]

    Gets the packet processor for the packet at the given index.

    Methods

    Name Description
    Clear()

    Removes and releases all the packets in the queue.

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    EnqueuePacket(out PacketProcessor)

    Acquires a new packet buffer from the packets pool if there are any available.

    EnqueuePackets(ref PacketsQueue)

    Copies all the packets from the given queue into this one. Note that no error is raised if not all packets could be copied. It is the responsibility of the caller to ensure that the queue can fit all the packets from the given queue.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023