#[non_exhaustive]pub enum GoodbyeReason {
AnotherServer,
ConcurrentAttempt,
Restart,
Shutdown,
UserRequest,
Unpaired,
PairingRequired,
Unauthorized,
}Expand description
Why a client says goodbye to a server.
The value is the reason field of client/goodbye, which the client sends before a graceful
close so the server knows whether to reconnect. The enum is non-exhaustive: a later revision may
add one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AnotherServer
The client is switching to another server.
messaging.md requires this reason from a client that leaves one server for another; with
one connection this revision only lets a host express it through
ClientHandle::close.
ConcurrentAttempt
The client rejected a second server because another one is already admitted.
A client that advertises _sendspin._tcp caps how many servers it serves at once; the
admission rule of connection.md, Multiple servers, rejects the loser with this reason
and closes the connection.
Restart
The client is restarting and will reconnect.
Shutdown
The client is shutting down or otherwise going offline.
UserRequest
The operator asked to disconnect from this server.
Unpaired
The client processed server/unpair.
PairingRequired
The client does not admit the unpaired session the server activated, because unpaired access is disabled and enabling it would make the activation admissible.
pairing.md § Unpaired Access requires a client that stops admitting unpaired access to
close any connection relying on it with this reason. messaging.md § server/activate
names it as the first rejection rule.
The server’s activation is not allowed for the matched PSK, or it names roles the connection may not use.
messaging.md § server/activate names this as the second rejection rule: the activity set
is not allowed for the matched PSK, or active_roles is non-empty on a connection that is not
playback-capable.