Struct DisconnectNoticeBroadcast
Sent immediately before a server closes a connection on purpose, so the player is told why instead of simply finding themselves back on the login screen.
public struct DisconnectNoticeBroadcast : IBroadcast
- Implements
-
IBroadcast
- Inherited Members
Remarks
FishNet does not carry a kick reason to the client, and nothing else in the pipeline did either outside the two queue systems — so every deliberate disconnect (failed character claim, unroutable client, scene handshake timeout, lease lost to another server) landed the player back at login with no explanation and no way to tell a transient fault from a permanent one.
This must be sent with NetworkConnection.Disconnect(false) rather than
Kick. Kick stops the transport immediately, which discards everything still
in the outgoing bundle — including this message. Disconnect(false) flushes the
tick's data first and only then closes, which is the whole reason the notice arrives at
all.
Fields
Reason
Why the connection is being closed.
public DisconnectNoticeReason Reason
Field Value
Terminal
True when reconnecting cannot help, so the client should abandon its retry loop and return to the login screen at once.
public bool Terminal
Field Value
Remarks
Only the server can judge this. A world server that could not find a scene instance expects the client to come straight back and try again, and telling it not to would turn a two-second hiccup into a forced re-login; a character that cannot be claimed at all will fail identically on every retry, and letting the loop run its full course leaves the player watching a spinner for minutes before reaching the same place.