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;
                        }
                        }
                    }
                }
            }
        }
 private void OnSocketConnectionFailed(DisquuunSocket source, string info, Exception e)
 {
     UpdateState();
     if (ConnectionFailed != null)
     {
         ConnectionFailed("OnSocketConnectionFailed:" + info, e);
     }
 }
        private void OnSocketOpened(DisquuunSocket source, string socketId)
        {
            if (connectionState != ConnectionState.OPENING)
            {
                return;
            }
            var availableSocketCount = socketPool.AvailableSocketNum();

            lock (lockObject)
            {
                if (connectionState != ConnectionState.OPENED && availableSocketCount == minConnectionCount)
                {
                    connectionState = ConnectionState.OPENED;
                    ConnectionOpened(connectionId);
                }
            }
        }