terminate

abstract fun terminate(): Result<Unit>(source)

Fully deregisters this connection: its message handler is cleared and its registration is removed from the server entirely, so it is no longer addressed by MultiConnectionUDPServer.pushToAll and any subsequent datagram from peer is dropped as unregistered. This is final - calling actuate again afterward is a silent no-op, since there is no longer a registration to bind against; the client must complete a fresh Iam handshake to be registered again.

Call this whenever a connection becomes stale from the application's point of view - e.g. an application-level refusal (over capacity, banned, etc.) discovered only after the WebTools-level handshake already completed.

Return

Result.success once deregistered, or the failure that prevented it