close

fun close()

Closes the WebSocket connection and updates the connection state.