public void SendToPostboxes(Message message)
 {
     foreach(Postbox box in postboxes)
     {
         box.PostMessage(message);
     }
 }
示例#2
0
 /// <summary>
 /// Push a message synchronously to the other thread
 /// </summary>
 /// <param name="message">The message to push</param>
 public override void PostMessage(Message message)
 {
     //Using closure to make it easy to send the message
     //this.dispatcher.Invoke(() =>
     //{
         MessageReceivedHandler messageEvent = OnMessage;
         if (messageEvent != null)
         {
             messageEvent(message);
         }
     //});
 }
示例#3
0
 public bool TryDeque(out Message message)
 {
     return this.bufferedMessages.TryDequeue(out message);
 }
示例#4
0
 public override void PostMessage(Message message)
 {
     this.bufferedMessages.Enqueue(message);
 }
 public MessageFrame CreateFrameFromMessage(Message message)
 {
     SimulationFrameComplete simMessage = message as SimulationFrameComplete;
     return new SimulationFrame(simMessage.data);
 }
 private void OnNewCommand(Message message)
 {
 }