From 9e76a817fcca198c1274a73fb35cd61c60fdf9f8 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 24 Apr 2019 11:30:58 -0600 Subject: [PATCH] Added additional inline comments for clarity --- Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs index 8d3e748..5b1bf3f 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs @@ -26,7 +26,15 @@ namespace PepperDash.Core /// /// public event EventHandler TextReceived; + + /// + /// This event will fire when a message is dequeued that includes the source IP and Port info if needed to determine the source of the received data. + /// public event EventHandler DataRecievedExtra; + + /// + /// Queue to temporarily store received messages with the source IP and Port info + /// private CrestronQueue MessageQueue; /// @@ -200,6 +208,7 @@ namespace PepperDash.Core } server.ReceiveDataAsync(Receive); + // Attempt to enter the CCritical Secion and if we can, start the dequeue thread var gotLock = DequeueLock.TryEnter(); if (gotLock) CrestronInvoke.BeginInvoke((o) => DequeueEvent());