aboutsummaryrefslogtreecommitdiff
path: root/Tools/Hazel-Networking/Hazel/SendOption.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-10-12 22:09:49 +0800
committerchai <215380520@qq.com>2023-10-12 22:09:49 +0800
commit8d2a2cd5de40e2b94ef5007c32832ed9a063dc40 (patch)
treea63dfbe815855925c9fb8f2804bd6ccfeffbd2eb /Tools/Hazel-Networking/Hazel/SendOption.cs
parentdd0c5d50e377d9be1e728463670908a6c9d2c14f (diff)
+hazel-networking
Diffstat (limited to 'Tools/Hazel-Networking/Hazel/SendOption.cs')
-rw-r--r--Tools/Hazel-Networking/Hazel/SendOption.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/Tools/Hazel-Networking/Hazel/SendOption.cs b/Tools/Hazel-Networking/Hazel/SendOption.cs
new file mode 100644
index 0000000..c2ffb22
--- /dev/null
+++ b/Tools/Hazel-Networking/Hazel/SendOption.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Hazel
+{
+ /// <summary>
+ /// Specifies how a message should be sent between connections.
+ /// </summary>
+ [Flags]
+ public enum SendOption : byte
+ {
+ /// <summary>
+ /// Requests unreliable delivery with no framentation.
+ /// </summary>
+ /// <remarks>
+ /// Sending data using unreliable delivery means that data is not guaranteed to arrive at it's destination nor is
+ /// it guarenteed to arrive only once. However, unreliable delivery can be faster than other methods and it
+ /// typically requires a smaller number of protocol bytes than other methods. There is also typically less
+ /// processing involved and less memory needed as packets are not stored once sent.
+ /// </remarks>
+ None = 0,
+
+ /// <summary>
+ /// Requests data be sent reliably but with no fragmentation.
+ /// </summary>
+ /// <remarks>
+ /// Sending data reliably means that data is guarenteed to arrive and to arrive only once. Reliable delivery
+ /// typically requires more processing, more memory (as packets need to be stored in case they need resending),
+ /// a larger number of protocol bytes and can be slower than unreliable delivery.
+ /// </remarks>
+ Reliable = 1,
+ }
+}