Exemplo n.º 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());
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
 }
Exemplo n.º 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;
 }