예제 #1
0
 private void SendAll()
 {
     while (true)
     {
         IMessage m = _messagesManager.GetMessage();
         if (m == null)
         {
             break;
         }
         m = new MessageRealization(m, new MessageAddress(_server));
         _converter.ConvertToSend(m);
     }
     _network.Send(_server);
 }
예제 #2
0
        private void SendAll()
        {
            while (true)
            {
                IMessage m = _messagesManager.GetMessage();
                if (m == null)
                {
                    break;
                }
                if (m.Address.Users.Count == 0)
                {
                    m = new MessageRealization(m.Data, new MessageAddress(_clients));
                }
                _converter.ConvertToSend(m);
            }

            foreach (IUserNetwork user in _clients)
            {
                _network.Send(user);
            }
        }