public void SendToPostboxes(Message message) { foreach(Postbox box in postboxes) { box.PostMessage(message); } }
/// <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); } //}); }
public bool TryDeque(out Message message) { return this.bufferedMessages.TryDequeue(out message); }
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) { }