close

open override fun close()

Forcefully closes the WebSocket session synchronously.

This method abruptly cancels the connection without a proper WebSocket close handshake. It is provided to satisfy the AutoCloseable interface. For a clean, graceful shutdown, prefer using the suspending closeSession method.