YellowDogMan.LiteNetLib
1.2.0-ydm-DYNWINDOW4
Prefix Reserved
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.7.1
This package targets .NET Framework 4.7.1. The package is compatible with this framework or higher.
This is a prerelease version of YellowDogMan.LiteNetLib.
dotnet add package YellowDogMan.LiteNetLib --version 1.2.0-ydm-DYNWINDOW4
NuGet\Install-Package YellowDogMan.LiteNetLib -Version 1.2.0-ydm-DYNWINDOW4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YellowDogMan.LiteNetLib" Version="1.2.0-ydm-DYNWINDOW4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YellowDogMan.LiteNetLib --version 1.2.0-ydm-DYNWINDOW4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: YellowDogMan.LiteNetLib, 1.2.0-ydm-DYNWINDOW4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YellowDogMan.LiteNetLib as a Cake Addin #addin nuget:?package=YellowDogMan.LiteNetLib&version=1.2.0-ydm-DYNWINDOW4&prerelease // Install YellowDogMan.LiteNetLib as a Cake Tool #tool nuget:?package=YellowDogMan.LiteNetLib&version=1.2.0-ydm-DYNWINDOW4&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LiteNetLib
Lite reliable UDP library for .NET Standard 2.0 (Mono, .NET Core, .NET Framework)
HighLevel API Part: LiteEntitySystem
OLD BRANCH (and examples) for 0.9.x
Build
NuGet
Release builds
DLL build from master
( Warning! Master branch can be unstable! )
Features
- Lightweight
- Small CPU and RAM usage
- Small packet size overhead ( 1 byte for unreliable, 4 bytes for reliable packets )
- Simple connection handling
- Peer to peer connections
- Helper classes for sending and reading messages
- Multiple data channels
- Different send mechanics
- Reliable with order
- Reliable without order
- Reliable sequenced (realiable only last packet)
- Ordered but unreliable with duplication prevention
- Simple UDP packets without order and reliability
- Fast packet serializer (Usage manual)
- Automatic small packets merging
- Automatic fragmentation of reliable packets
- Automatic MTU detection
- Optional CRC32C checksums
- UDP NAT hole punching
- NTP time requests
- Packet loss and latency simulation
- IPv6 support (using separate socket for performance)
- Connection statisitcs
- Multicasting (for discovering hosts in local network)
- Unity support
- Support for .NET8 optimized socket calls (much less gc)
- Supported platforms:
- Windows/Mac/Linux (.NET Framework, Mono, .NET Core, .NET Standard)
- Lumin OS (Magic Leap)
- Monogame
- Godot
- Unity 2018.3 (Desktop platforms, Android, iOS, Switch)
Support developer
Unity notes!!!
- Minimal supported Unity is 2018.3. For older Unity versions use 0.9.x library versions
- Always use library sources instead of precompiled DLL files ( because there are platform specific #ifdefs and workarounds for unity bugs )
Usage samples
Client
EventBasedNetListener listener = new EventBasedNetListener();
NetManager client = new NetManager(listener);
client.Start();
client.Connect("localhost" /* host ip or name */, 9050 /* port */, "SomeConnectionKey" /* text key or NetDataWriter */);
listener.NetworkReceiveEvent += (fromPeer, dataReader, deliveryMethod, channel) =>
{
Console.WriteLine("We got: {0}", dataReader.GetString(100 /* max length of string */));
dataReader.Recycle();
};
while (!Console.KeyAvailable)
{
client.PollEvents();
Thread.Sleep(15);
}
client.Stop();
Server
EventBasedNetListener listener = new EventBasedNetListener();
NetManager server = new NetManager(listener);
server.Start(9050 /* port */);
listener.ConnectionRequestEvent += request =>
{
if(server.ConnectedPeersCount < 10 /* max connections */)
request.AcceptIfKey("SomeConnectionKey");
else
request.Reject();
};
listener.PeerConnectedEvent += peer =>
{
Console.WriteLine("We got connection: {0}", peer); // Show peer ip
NetDataWriter writer = new NetDataWriter(); // Create writer class
writer.Put("Hello client!"); // Put some string
peer.Send(writer, DeliveryMethod.ReliableOrdered); // Send with reliability
};
while (!Console.KeyAvailable)
{
server.PollEvents();
Thread.Sleep(15);
}
server.Stop();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.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.0-ydm-DYNWINDOW4 | 54 | 6/26/2024 |
1.2.0-ydm-DYNWINDOW3 | 55 | 6/25/2024 |
1.2.0-ydm-DYNWINDOW2 | 57 | 6/25/2024 |
1.2.0-ydm-DYNWINDOW | 52 | 6/25/2024 |
1.2.0-ydm-DEBUG | 64 | 3/28/2024 |
1.2.0-ydm-0.7.0 | 118 | 7/7/2024 |
1.2.0-ydm-0.6.1 | 78 | 5/4/2024 |
1.2.0-ydm-0.6.0 | 75 | 4/24/2024 |
1.2.0-ydm-0.5.0 | 59 | 4/18/2024 |
1.2.0-ydm-0.4.0 | 84 | 4/12/2024 |
1.2.0-ydm-0.3.0-DEBUG | 46 | 3/28/2024 |
1.2.0-ydm-0.2.0 | 71 | 2/15/2024 |
1.2.0-ydm-0.1.0 | 73 | 2/14/2024 |