ReliableUdp 1.1.0-alpha
See the version list below for details.
dotnet add package ReliableUdp --version 1.1.0-alpha
NuGet\Install-Package ReliableUdp -Version 1.1.0-alpha
<PackageReference Include="ReliableUdp" Version="1.1.0-alpha" />
paket add ReliableUdp --version 1.1.0-alpha
#r "nuget: ReliableUdp, 1.1.0-alpha"
// Install ReliableUdp as a Cake Addin #addin nuget:?package=ReliableUdp&version=1.1.0-alpha&prerelease // Install ReliableUdp as a Cake Tool #tool nuget:?package=ReliableUdp&version=1.1.0-alpha&prerelease
ReliableUdp
.NET library that implements reliable (and optionally ordered) UDP delivery. The design is inspired by Gaffer on Games article: https://gafferongames.com/post/reliable_ordered_messages/. Since the library targets the .NET Standard 1.0 any .NET project using any framework is supported including Unity 2018.1 and up.
The library guarantees that messages are:
- sent reliably (individual message can be optionally sent unreliably)
- received without duplicates
- received in order (optional)
❗ When using this library it is vital that the client and server both use this library to send and receive messages.
The library does not exercise head of line blocking in the traditional sense, but rather re-sends messages until a confirmation (ack) of their receival has been received. Messages are sent again after the previous sent time + RTT has passed. This could in theory lead to duplicate messages, but the library sorts those cases out. More recent messages are still continously sent and when received they're buffered and made available once the previous lost message has arrived.
⚠️ When the library is used to receive messages in order a delay occurs for all reliable messages that arrive after a lost message should've arrived until the lost message was sent again and received successfully. The delay is usually equal to the length of the RTT. If this behavior is not acceptable, the library can provide messages immediately when they have been received (while keeping them reliable) which can lead to them not being in the same order as they have been sent in.
In addition to the above the library provides an interface to serialize/deserialize messages and handles packing messages together into packets. A packet containing multiple messages is kept under 508 bytes (can be configured differently). This is due to the MUT of the ip protocol to decrease the occurance of packet fragmentations and therefore decrease the chance of losing a packet (a missing fragment of a ip packet will cause the entire ip packet to be dropped). 508 bytes is chosen because it leaves enough room for a potentially expanded ip header to support IPv6 and routers adding aditional data to the header. Bigger messages than 508 bytes can be transmitted too, but will be sent in a separate packet without other messages packed into the same packet. No additional action for this has to be taken by the user of this library to make it work. Bigger messages have the same reliability, in-order and deduplication guarantees as smaller packets, but can result in higher packet loss ratios. The overhead for each packet is 8 bytes per packet (see PacketHeader) and 5 bytes per message (see BaseMessage).
The library strives for high quality by:
- keeping the library code clean and simple
- no external third-party dependencies (see .csproj file)
- testing broadly with unit- and integration-tests cross-platform
- limiting feature-set to bare needed minimum
- implementing a clear and easy to use API
- providing good documentation and examples
Roadmap:
- Reliable ordered delivery
- Add examples
- Support for unreliable messages
- Support for unordered message receival
- Support for raw buffers (not using built-in serialization/deserialization system)
- Retransmission based on RTT (flood control)
- Optimize memory allocation
- DTLS support
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.0 is compatible. netstandard1.1 was computed. netstandard1.2 was computed. netstandard1.3 was computed. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Windows Phone | wp8 was computed. wp81 was computed. wpa81 was computed. |
Windows Store | netcore was computed. netcore45 was computed. netcore451 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.0
- NETStandard.Library (>= 1.6.1)
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.1-alpha | 148 | 3/8/2022 |
1.2.0-alpha | 127 | 3/3/2022 |
1.1.0-alpha | 128 | 2/20/2022 |
1.0.1-alpha | 164 | 1/4/2022 |