close

abstract fun close(code: Int, reason: String?): Boolean

Gracefully closes the WebSocket connection.