docs.unity3d.com
    Show / Hide Table of Contents

    Enum RelayConnectionStatus

    State of the connection to the relay server.

    Namespace: Unity.Networking.Transport.Relay
    Syntax
    public enum RelayConnectionStatus

    Fields

    Name Description Value
    NotEstablished

    Connection has yet to be established to the relay server.

    Establishing a connection will be done automatically when calling Connect(NetworkEndpoint) or Bind(NetworkEndpoint). If the connection is successful, the status changes to Established. If not successful, the status changes to AllocationInvalid.


    0
    Established

    Connection to the relay server is established.

    Once a connection to the relay server is established, it will remain so until either the NetworkDriver is disposed of, or an error occurs that invalidates the relay service allocation. In the latter case, the status will change to AllocationInvalid.


    1
    AllocationInvalid

    Connection to the relay server has failed due to an invalid allocation.

    This status indicates that the allocation used to connect to the relay server is invalid, either because an invalid allocation was provided in or because the allocation timed out due to inactivity (the latter can happen if the value of relayConnectionTimeMS provided in is too high or if ScheduleUpdate(JobHandle) is not called often enough).

    In both cases, this is an unrecoverable error. A new allocation needs to be created through the relay service, and a new NetworkDriver needs to be created with that allocation.


    2
    In This Article
    • Fields
    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