docs.unity.cn
    Show / Hide Table of Contents

    Class ReliableStageParameterExtensions

    Extensions for ReliableUtility.Parameters.

    Inheritance
    Object
    ReliableStageParameterExtensions
    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
    Syntax
    public static class ReliableStageParameterExtensions

    Methods

    GetReliableStageParameters(ref NetworkSettings)

    Gets the ReliableUtility.Parameters in the settings.

    Declaration
    public static ReliableUtility.Parameters GetReliableStageParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to get parameters from.

    Returns
    Type Description
    ReliableUtility.Parameters

    Structure containing the reliable parameters.

    WithReliableStageParameters(ref NetworkSettings, Int32, Int32, Int32)

    Sets the ReliableUtility.Parameters in the settings.

    Declaration
    public static ref NetworkSettings WithReliableStageParameters(this ref NetworkSettings settings, int windowSize = 32, int minimumResendTime = 64, int maximumResendTime = 200)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to modify.

    Int32 windowSize

    Maximum number in-flight packets per pipeline/connection combination. Default value is 32 but can be increased to 64 at the cost of slightly larger packet headers.

    Int32 minimumResendTime

    Minimum amount of time to wait before a reliable packet is resent if it's not been acknowledged. Default value is 64ms, which should be set lower if all connections are expected to be very good (RTT of 25ms or less).

    Int32 maximumResendTime

    Maximum amount of time to wait before a reliable packet is resent if it's not been acknowledged. Default value is 200ms, which should be set higher if all connections are expected to have a higher latency than that.

    Returns
    Type Description
    NetworkSettings

    Settings structure with modified values.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, June 1, 2023