Example #1
0
        public XPloitSocketClient[] SearchClients(delIsClient comparer, params object[] tag)
        {
            List <XPloitSocketClient> lx = new List <XPloitSocketClient>();

            lock (_Clients)
            {
                foreach (XPloitSocketClient cl1 in _Clients)
                {
                    if (comparer == null || comparer(cl1, tag))
                    {
                        lx.Add(cl1);
                    }
                }
            }
            return(lx.ToArray());
        }
Example #2
0
        public int RaiseActionForClient(delIsClient comparer, delIsClient action, params object[] tag)
        {
            if (action == null)
            {
                return(0);
            }
            int dv = 0;

            lock (_Clients)
            {
                foreach (XPloitSocketClient client in _Clients)
                {
                    if (comparer == null || comparer(client, tag))
                    {
                        if (action(client, tag))
                        {
                            dv++;
                        }
                    }
                }
            }
            return(dv);
        }
Example #3
0
 public XPloitSocketClient[] SearchClients(delIsClient comparer, params object[] tag)
 {
     List<XPloitSocketClient> lx = new List<XPloitSocketClient>();
     lock (_Clients)
     {
         foreach (XPloitSocketClient cl1 in _Clients)
             if (comparer == null || comparer(cl1, tag)) lx.Add(cl1);
     }
     return lx.ToArray();
 }
Example #4
0
 public int RaiseActionForClient(delIsClient comparer, delIsClient action, params object[] tag)
 {
     if (action == null) return 0;
     int dv = 0;
     lock (_Clients)
     {
         foreach (XPloitSocketClient client in _Clients)
             if (comparer == null || comparer(client, tag))
             {
                 if (action(client, tag)) dv++;
             }
     }
     return dv;
 }