Nebula
Client

DisconnectReason

Why a client's connection to the gateway ended, or why an attempt to connect failed.

generated from the sources
public enum DisconnectReason : byte

Why a client's connection to the gateway ended, or why an attempt to connect failed. Carried by DisconnectInfo in NebulaClient.Disconnected and NebulaClient.LastDisconnect. Branch on it to choose what to show: a network problem on the player's side, a server that is down, or a decision the server made.

Members

NameValueDescription
Unknown0The transport did not say why the link closed. A custom ITransport that reports no reason produces this.
Timeout1The connection was up and the gateway stopped answering for longer than the transport's disconnect timeout: the gateway, or the network between, went away.
NetworkUnreachable2The player's own network is down: the client's machine has no route to the gateway.
HostUnreachable3The gateway could not be reached: nothing answered at its address, it refused the connection, or its name did not resolve.
ClosedByServer4The gateway closed the connection without saying why, or restarted and no longer knows this client.
Kicked5The server removed this player (NebulaWorker.Kick or NebulaGateway.Kick). DisconnectInfo.Message is the server's reason and DisconnectInfo.Code the game's own code. The session is over, the session token is cleared, and the client does not reconnect by itself.
SessionReplaced6This player connected again somewhere else and the newer connection took the session (NebulaClient.SessionReplaced). The client does not reconnect by itself.
JoinRefused7The gateway refused the join (NebulaClient.JoinRefused); NebulaClient.JoinRejectReason holds the typed reason. The client retries only when the gateway asked it to.
ServerShutdown8The gateway is shutting down and no other gateway was serving: the server is going away, or restarting. The client reconnects on its normal schedule with its session token, so a server back within NebulaConfig.SessionReclaimSeconds can give the pawn back.
ClientRequested9The game called NebulaClient.Disconnect or NebulaClient.Leave, directly or through NebulaClient.ConnectTo.
GatewayDraining10The gateway is being taken out of service and asked the client to reconnect (NebulaClient.GatewayDraining). The client reconnects at once with its session token.
EncryptionFailed11The encrypted connection was refused: the key exchange failed or the gateway's certificate did not match the pinned fingerprint.

On this page