CloseReason

sealed interface CloseReason

Reason a Seam is being closed. Designed as a forward-compatible sealed hierarchy — new variants can be added without breaking existing when exhaustiveness because the common cases are covered.

Inheritors

Types

Link copied to clipboard
data class Error(val throwable: Throwable) : CloseReason

Closed due to an error on the local side.

Link copied to clipboard
data object Normal : CloseReason

Clean, intentional disconnect.

Link copied to clipboard

The remote peer requested the close.

Link copied to clipboard
data object Unreachable : CloseReason

The fabric never wove — the join target was absent or the handshake timed out.