docs.unity.cn
    Show / Hide Table of Contents

    Class CommonNetworkParametersExtensions

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

    Methods

    GetDataStreamParameters(ref NetworkSettings)

    Gets the NetworkDataStreamParameter

    Declaration
    public static NetworkDataStreamParameter GetDataStreamParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    NetworkSettings to get parameters from.

    Returns
    Type Description
    NetworkDataStreamParameter

    Returns the NetworkDataStreamParameter values for the NetworkSettings

    GetNetworkConfigParameters(ref NetworkSettings)

    Gets the NetworkConfigParameter in the settings.

    Declaration
    public static NetworkConfigParameter GetNetworkConfigParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to get parameters from.

    Returns
    Type Description
    NetworkConfigParameter

    Structure containing the network parameters.

    WithDataStreamParameters(ref NetworkSettings, Int32)

    Sets the NetworkDataStreamParameter values for the NetworkSettings

    Declaration
    [Obsolete("In Unity Transport 2.0, the data stream size will always be dynamically-sized and this API will be removed.")]
    public static ref NetworkSettings WithDataStreamParameters(this ref NetworkSettings settings, int size = 0)
    Parameters
    Type Name Description
    NetworkSettings settings
    Int32 size size
    Returns
    Type Description
    NetworkSettings

    WithNetworkConfigParameters(ref NetworkSettings, Int32, Int32, Int32, Int32, Int32, Int32)

    Declaration
    public static ref NetworkSettings WithNetworkConfigParameters(this ref NetworkSettings settings, int connectTimeoutMS, int maxConnectAttempts, int disconnectTimeoutMS, int heartbeatTimeoutMS, int maxFrameTimeMS, int fixedFrameTimeMS)
    Parameters
    Type Name Description
    NetworkSettings settings
    Int32 connectTimeoutMS
    Int32 maxConnectAttempts
    Int32 disconnectTimeoutMS
    Int32 heartbeatTimeoutMS
    Int32 maxFrameTimeMS
    Int32 fixedFrameTimeMS
    Returns
    Type Description
    NetworkSettings

    WithNetworkConfigParameters(ref NetworkSettings, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

    Declaration
    public static ref NetworkSettings WithNetworkConfigParameters(this ref NetworkSettings settings, int connectTimeoutMS = 1000, int maxConnectAttempts = 60, int disconnectTimeoutMS = 30000, int heartbeatTimeoutMS = 500, int maxFrameTimeMS = 0, int fixedFrameTimeMS = 0, int maxMessageSize = 1400)
    Parameters
    Type Name Description
    NetworkSettings settings
    Int32 connectTimeoutMS
    Int32 maxConnectAttempts
    Int32 disconnectTimeoutMS
    Int32 heartbeatTimeoutMS
    Int32 maxFrameTimeMS
    Int32 fixedFrameTimeMS
    Int32 maxMessageSize
    Returns
    Type Description
    NetworkSettings
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 28, 2023