docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum DisconnectReason

    Reason for a disconnection event.

    Namespace: Unity.Networking.Transport.Error
    Assembly: solution.dll
    Syntax
    public enum DisconnectReason : byte
    Remarks

    One of these values may be present as a single byte in the DataStreamReader obtained with PopEvent(out NetworkConnection, out DataStreamReader) if the event type is Disconnect.

    Fields

    Name Description
    ClosedByRemote

    Indicates the connection was closed normally by the remote peer after calling Disconnect(NetworkConnection) or NetworkConnection.close.

    Count

    Used internally to track the number of reasons. Keep last.

    Default

    Used internally when no other reason fits.

    MaxConnectionAttempts

    Indicates the connection failed to establish after too many failed attempts (see maxConnectAttempts).

    Timeout

    Indicates the connection timed out (see disconnectTimeoutMS).

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)