// Shut down the client if in an invalid client state
        void ShutdownIfInvalid()
        {
            var headlessClient = gameObject.GetComponent <HeadlessPingClientBehaviour>();
            var guiClient      = gameObject.GetComponent <GuiPingClientBehaviour>();

            if (headlessClient == null && guiClient == null)
            {
                Debug.LogError($"{nameof(HeadlessPingClientBehaviour)} and {nameof(GuiPingClientBehaviour)} couldn't be found, shutting down.");
                PingUtilities.EndProgram();
            }
        }
 void ShutDown(ExitCode exitCode)
 {
     StopAllCoroutines();
     PingUtilities.EndProgram((int)exitCode);
 }