Exemple #1
0
 public void Poll()
 {
     while (client.Available > 0)
     {
         byte[] bytes;
         if (packet.Receive(out bytes))
         {
             if (commandExec != null)
             {
                 commandExec(this, bytes);
             }
         }
     }
 }
        public void Poll()
        {
            if (!Connected())
            {
                return;
            }

            while (client.Available > 0)
            {
                byte[] bytes;
                if (packet.Receive(out bytes))
                {
                    if (ReceviedEvent != null)
                    {
                        ReceviedEvent(bytes);
                    }
                }
            }
        }