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

    Class QosStats

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

    Constructors

    QosStats(UInt32, Single)

    Declaration
    public QosStats(uint numResults, float weightOfCurrentResult)
    Parameters
    Type Name Description
    UInt32 numResults
    Single weightOfCurrentResult

    Methods

    AddResult(String, QosResult)

    Add a result to the weighted rolling average history.

    Declaration
    public void AddResult(string ipAndPort, QosResult result)
    Parameters
    Type Name Description
    String ipAndPort

    IP:Port string to identify where the results go

    QosResult result

    The result to add to the history. This result becomes the current result.

    TryGetAllResults(String, out QosStatsResult[])

    Get an array of all the results currently being tracked for the given key.

    Declaration
    public bool TryGetAllResults(string ipAndPort, out QosStatsResult[] results)
    Parameters
    Type Name Description
    String ipAndPort

    IP:Port string to get results for

    QosStatsResult[] results

    Array of results (unweighted) used to compute the weighted average.

    Returns
    Type Description
    Boolean

    true if record(s) were found, false if key does not exist or no valid records found

    Remarks

    There is no way to determine which results correspond to the most recently added results.

    TryGetWeightedAverage(String, out QosStatsResult)

    Get the weighted rolling average for the given key.

    Declaration
    public bool TryGetWeightedAverage(string ipAndPort, out QosStatsResult result)
    Parameters
    Type Name Description
    String ipAndPort

    IP:Port string to get results for

    QosStatsResult result

    The weighted rolling average for the given ipAndPort

    Returns
    Type Description
    Boolean

    true if the record was found, 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