Class QosResponse | Multiplay QoS Client | 0.1.1-preview.4
docs.unity3d.com
    Show / Hide Table of Contents

    Class QosResponse

    Inheritance
    Object
    QosResponse
    Namespace: Unity.Networking.QoS
    Syntax
    public class QosResponse

    Fields

    MaxPacketLen

    Declaration
    public const int MaxPacketLen = 1500
    Field Value
    Type Description
    Int32

    MinPacketLen

    Declaration
    public const int MinPacketLen = 13
    Field Value
    Type Description
    Int32

    ResponseMagic

    Declaration
    public const byte ResponseMagic = 149
    Field Value
    Type Description
    Byte

    ResponseVersion

    Declaration
    public const byte ResponseVersion = 0
    Field Value
    Type Description
    Byte

    Properties

    FlowControl

    Declaration
    public byte FlowControl { get; }
    Property Value
    Type Description
    Byte

    Identifier

    Declaration
    public ushort Identifier { get; }
    Property Value
    Type Description
    UInt16

    LatencyMs

    Declaration
    public int LatencyMs { get; }
    Property Value
    Type Description
    Int32

    Length

    Declaration
    public ushort Length { get; }
    Property Value
    Type Description
    UInt16

    Magic

    Declaration
    public byte Magic { get; }
    Property Value
    Type Description
    Byte

    Sequence

    Declaration
    public byte Sequence { get; }
    Property Value
    Type Description
    Byte

    Timestamp

    Declaration
    public ulong Timestamp { get; }
    Property Value
    Type Description
    UInt64

    Version

    Declaration
    public byte Version { get; }
    Property Value
    Type Description
    Byte

    Methods

    ParseFlowControl()

    Parses the FlowControl 4-bit value into the type and number of units (duration) that have been applied.

    Declaration
    public (FcType type, byte units) ParseFlowControl()
    Returns
    Type Description
    ValueTuple<FcType, Byte>

    (type, units) where type is the flow control type (FcType.None for no flow control), and units is the number of units of that type of flow control that the server has applied (and we should adhere to).

    Recv(Int64, Boolean, DateTime, ref NetworkInterfaceEndPoint)

    Receive a QosResponse if one is available

    Declaration
    public (int received, int errorcode) Recv(long socket, bool wait, DateTime expireTimeUtc, ref NetworkInterfaceEndPoint endPoint)
    Parameters
    Type Name Description
    Int64 socket

    Native socket descriptor

    Boolean wait
    DateTime expireTimeUtc

    When to stop waiting for a response

    NetworkInterfaceEndPoint endPoint
    Returns
    Type Description
    ValueTuple<Int32, Int32>

    (received, errorcode) where received is the number of bytes received and errorcode is the error code if any. 0 means no error.

    Verify(UInt32, ref String)

    Verifies the QosResponse contains valid required fields

    Declaration
    public bool Verify(uint maxSequence, ref string error)
    Parameters
    Type Name Description
    UInt32 maxSequence
    String error

    Contains the description of the first validation failure if valiation failed

    Returns
    Type Description
    Boolean

    true if basic validation passes, false otherwise

    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