docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum DisconnectReason

    Reasons for a Disconnect event. This can be obtained by reading a single byte off the Unity.Collections.DataStreamReader obtained when calling PopEvent(out NetworkConnection, out DataStreamReader) when the popped event is for a disconnection.

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

    Fields

    Name Description
    AuthenticationFailure

    Indicates the connection failed to be established because the remote peer could not be authenticated. This can only occur if using DTLS or TLS (with WebSockets).

    ClosedByRemote

    Indicates the connection was manually closed by the remote peer.

    Default

    Internal value. Do not use.

    HostNotFound

    When connecting using a hostname instead of an IP, this indicates the host could not be found.

    MaxConnectionAttempts

    Indicates the connection failed to be established because the server could not be reached (see maxConnectAttempts).

    ProtocolError

    Indicates the connection failed because of a low-level protocol error (unexpected socket error, malformed payload in a TCP stream, etc.). This denotes an error that is both unexpected and that can't be recovered from. As such it should not be returned under normal operating circumstances.

    Timeout

    Indicates the connection timed out due to inactivity.

    In This Article
    Back to top
    Copyright © 2024 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)