closeSession

suspend fun closeSession()

Gracefully closes the WebSocket session.

This is a suspending method that performs a proper WebSocket closing handshake, ensuring the server is notified that the connection is ending cleanly.