docs.unity3d.com
    Show / Hide Table of Contents

    Struct NetworkConfigParameter

    The NetworkConfigParameter is used to set specific parameters that the driver uses.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Networking.Transport
    Syntax
    public struct NetworkConfigParameter : INetworkParameter

    Fields

    connectTimeoutMS

    A timeout in milliseconds indicating how long we will wait until we send a new connection attempt.

    Declaration
    public int connectTimeoutMS
    Field Value
    Type Description
    Int32

    disconnectTimeoutMS

    A timeout in milliseconds indicating how long we will wait for a connection event, before we disconnect it.

    Declaration
    public int disconnectTimeoutMS
    Field Value
    Type Description
    Int32
    Remarks

    The connection needs to receive data from the connected endpoint within this timeout. Note that with heartbeats enabled (heartbeatTimeoutMS > 0), simply not sending any data will not be enough to trigger this timeout (since heartbeats count as connection events).

    fixedFrameTimeMS

    A fixed amount of time to use for an interval between ScheduleUpdate. This is used instead of a clock.

    Declaration
    public int fixedFrameTimeMS
    Field Value
    Type Description
    Int32
    Remarks

    The main use for this parameter is tests where determinism is more important than correctness.

    heartbeatTimeoutMS

    A timeout in milliseconds after which a heartbeat is sent if there is no activity.

    Declaration
    public int heartbeatTimeoutMS
    Field Value
    Type Description
    Int32

    maxConnectAttempts

    The maximum amount of connection attempts we will try before disconnecting.

    Declaration
    public int maxConnectAttempts
    Field Value
    Type Description
    Int32

    maxFrameTimeMS

    The maximum amount of time a single frame can advance timeout values.

    Declaration
    public int maxFrameTimeMS
    Field Value
    Type Description
    Int32
    Remarks

    The main use for this parameter is to not get disconnects at frame spikes when both endpoints lives in the same process.

    Methods

    Validate()

    Validate the settings.

    Declaration
    public bool Validate()
    Returns
    Type Description
    Boolean

    True if the settings are valid, false otherwise.

    Implements
    INetworkParameter.Validate()
    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