mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 05:04:48 +00:00
Added additional inline comments for clarity
This commit is contained in:
@@ -26,7 +26,15 @@ namespace PepperDash.Core
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
public event EventHandler<GenericUdpReceiveTextExtraArgs> DataRecievedExtra;
|
public event EventHandler<GenericUdpReceiveTextExtraArgs> DataRecievedExtra;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Queue to temporarily store received messages with the source IP and Port info
|
||||||
|
/// </summary>
|
||||||
private CrestronQueue<GenericUdpReceiveTextExtraArgs> MessageQueue;
|
private CrestronQueue<GenericUdpReceiveTextExtraArgs> MessageQueue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -200,6 +208,7 @@ namespace PepperDash.Core
|
|||||||
}
|
}
|
||||||
server.ReceiveDataAsync(Receive);
|
server.ReceiveDataAsync(Receive);
|
||||||
|
|
||||||
|
// Attempt to enter the CCritical Secion and if we can, start the dequeue thread
|
||||||
var gotLock = DequeueLock.TryEnter();
|
var gotLock = DequeueLock.TryEnter();
|
||||||
if (gotLock)
|
if (gotLock)
|
||||||
CrestronInvoke.BeginInvoke((o) => DequeueEvent());
|
CrestronInvoke.BeginInvoke((o) => DequeueEvent());
|
||||||
|
|||||||
Reference in New Issue
Block a user