#[non_exhaustive]pub enum GoodbyeReason {
AnotherServer,
ConcurrentAttempt,
Restart,
Shutdown,
UserRequest,
Unpaired,
}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. Only the reasons this revision can reach are
named: unauthorized and pairing_required are left out until the states that produce them
exist. 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.