docs.unity3d.com
    Show / Hide Table of Contents

    Enum DisconnectReason

    Reason for a disconnection event.

    Namespace: Unity.Networking.Transport.Error
    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 Value
    Default

    Used internally when no other reason fits.


    This shouldn't normally appear as a result of calling PopEvent(out NetworkConnection, out DataStreamReader).

    0
    Timeout

    Indicates the connection timed out (see disconnectTimeoutMS).


    1
    MaxConnectionAttempts

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


    2
    ClosedByRemote

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


    3
    Count

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


    4
    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