Enum DisconnectReason
Reasons for a Disconnect event. This can be obtained by reading a single byte off the DataStreamReader obtained when calling PopEvent(out NetworkConnection, out DataStreamReader) when the popped event is for a disconnection.
Namespace: Unity.Networking.Transport.Error
Syntax
public enum DisconnectReason : byte
Fields
Name | Description | Value |
---|---|---|
Default | Internal value. Do not use. |
0 |
Timeout | Indicates the connection timed out due to inactivity. |
1 |
MaxConnectionAttempts | Indicates the connection failed to be established. |
2 |
ClosedByRemote | Indicates the connection was manually closed by the remote peer. |
3 |
Count | Internal value. Do not use. |
4 |