Example #1
0
        public void StopServer()
        {
#if !UNITY_WEBGL || UNITY_EDITOR
            if (wsServer != null)
            {
                wsServer.Dispose();
            }
            if (wssServer != null)
            {
                wssServer.Dispose();
            }
            wsServer         = null;
            wssServer        = null;
            nextConnectionId = 1;
#endif
        }
        public void StopServer()
        {
#if !UNITY_WEBGL
            if (wsServer != null)
            {
                wsServer.Dispose();
            }
            if (wssServer != null)
            {
                wssServer.Dispose();
            }
            wsServer  = null;
            wssServer = null;
            if (Server != null)
            {
                Server.Stop();
            }
            Server           = null;
            nextConnectionId = 1;
#endif
        }