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. |
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. |