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