docs.unity3d.com
    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

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

    NetworkSettings to get parameters from.

    Returns
    Type Description
    NetworkConfigParameter

    Returns the NetworkConfigParameter values for the NetworkSettings

    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)

    Sets the NetworkConfigParameter values for the NetworkSettings

    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)
    Parameters
    Type Name Description
    NetworkSettings settings

    NetworkSettings to modify.

    Int32 connectTimeoutMS connectTimeoutMS
    Int32 maxConnectAttempts maxConnectAttempts
    Int32 disconnectTimeoutMS disconnectTimeoutMS
    Int32 heartbeatTimeoutMS heartbeatTimeoutMS
    Int32 maxFrameTimeMS maxFrameTimeMS
    Int32 fixedFrameTimeMS fixedFrameTimeMS
    Returns
    Type Description
    NetworkSettings

    Modified NetworkSettings.

    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