From 8d2a2cd5de40e2b94ef5007c32832ed9a063dc40 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 12 Oct 2023 22:09:49 +0800 Subject: +hazel-networking --- Tools/Hazel-Networking/Hazel/SendOption.cs | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Tools/Hazel-Networking/Hazel/SendOption.cs (limited to 'Tools/Hazel-Networking/Hazel/SendOption.cs') 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 +{ + /// + /// Specifies how a message should be sent between connections. + /// + [Flags] + public enum SendOption : byte + { + /// + /// Requests unreliable delivery with no framentation. + /// + /// + /// 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. + /// + None = 0, + + /// + /// Requests data be sent reliably but with no fragmentation. + /// + /// + /// 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. + /// + Reliable = 1, + } +} -- cgit v1.1-26-g67d0