public void OnReloaded(DisquuunSocket reloadedSocket)
        {
            lock (lockObject) {
                if (stackSocket.IsQueued())
                {
                    if (reloadedSocket.IsChoosable())
                    {
                        reloadedSocket.SetBusy();

                        var commandAndData = stackSocket.Dequeue();
                        switch (commandAndData.executeType)
                        {
                        case DisquuunExecuteType.ASYNC: {
                            reloadedSocket.Async(commandAndData.commands, commandAndData.data, commandAndData.Callback);
                            return;
                        }

                        case DisquuunExecuteType.LOOP: {
                            reloadedSocket.Loop(commandAndData.commands, commandAndData.data, commandAndData.Callback);
                            return;
                        }

                        case DisquuunExecuteType.PIPELINE: {
                            reloadedSocket.Execute(commandAndData.commands, commandAndData.data, commandAndData.Callback);
                            return;
                        }
                        }
                    }
                }
            }
        }
Exemple #2
0
        public void OnReloaded(DisquuunSocket reloadedSocket)
        {
            lock (lockObject) {
                if (stackSocket.IsQueued())
                {
                    if (reloadedSocket.IsChoosable())
                    {
                        reloadedSocket.SetBusy();

                        var commandAndData = stackSocket.Dequeue();

                        if (commandAndData.data.Length == 0)
                        {
                            Disquuun.Log("OnReloaded len = 0.", true);
                        }
                        switch (commandAndData.executeType)
                        {
                        case DisquuunExecuteType.ASYNC: {
                            reloadedSocket.Async(commandAndData.command, commandAndData.data, commandAndData.Callback);
                            return;
                        }

                        case DisquuunExecuteType.LOOP: {
                            reloadedSocket.Loop(commandAndData.command, commandAndData.data, commandAndData.Callback);
                            return;
                        }
                        }
                    }
                }
            }
        }