aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/ReceivedUdpData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RSSDP/ReceivedUdpData.cs')
-rw-r--r--RSSDP/ReceivedUdpData.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/RSSDP/ReceivedUdpData.cs b/RSSDP/ReceivedUdpData.cs
new file mode 100644
index 000000000..d1c2ca3c9
--- /dev/null
+++ b/RSSDP/ReceivedUdpData.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Rssdp.Infrastructure
+{
+ /// <summary>
+ /// Used by the sockets wrapper to hold raw data received from a UDP socket.
+ /// </summary>
+ public sealed class ReceivedUdpData
+ {
+ /// <summary>
+ /// The buffer to place received data into.
+ /// </summary>
+ public byte[] Buffer { get; set; }
+
+ /// <summary>
+ /// The number of bytes received.
+ /// </summary>
+ public int ReceivedBytes { get; set; }
+
+ /// <summary>
+ /// The <see cref="UdpEndPoint"/> the data was received from.
+ /// </summary>
+ public UdpEndPoint ReceivedFrom { get; set; }
+ }
+}