All Projects → RevenantX → Litenetlib

RevenantX / Litenetlib

Licence: mit
Lite reliable UDP library for Mono and .NET

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Litenetlib

Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+102.85%)
Mutual labels:  network, networking, udp, cross-platform
Enet
⚡️ ENet reliable UDP networking library
Stars: ✭ 202 (-90.73%)
Mutual labels:  network, networking, udp
Ruffles
Lightweight and fully managed reliable UDP library.
Stars: ✭ 131 (-93.99%)
Mutual labels:  network, networking, udp
Netlink
Socket and Networking Library using msgpack.org[C++11]
Stars: ✭ 197 (-90.96%)
Mutual labels:  networking, udp, cross-platform
Fo Dicom
Fellow Oak DICOM for .NET, .NET Core, Universal Windows, Android, iOS, Mono and Unity
Stars: ✭ 674 (-69.07%)
Mutual labels:  unity-3d, mono, dot-net
Joynet
high performance network (tcp socket) library for lua, based on https://github.com/IronsDu/brynet and lua coroutine.
Stars: ✭ 101 (-95.36%)
Mutual labels:  networking, cross-platform
Reactor Netty
TCP/HTTP/UDP/QUIC client/server with Reactor over Netty
Stars: ✭ 1,743 (-20.01%)
Mutual labels:  udp, mono
Fi6s
IPv6 network scanner designed to be fast
Stars: ✭ 116 (-94.68%)
Mutual labels:  network, udp
Fonline
FOnline Engine is a flexible cross-platform isometric game engine
Stars: ✭ 128 (-94.13%)
Mutual labels:  cross-platform, mono
Netfil
A kernel network manager with monitoring and limiting capabilities for macOS. #nsacyber
Stars: ✭ 97 (-95.55%)
Mutual labels:  network, networking
Skiasharp.extended
SkiaSharp is a cross-platform, comprehensive 2D graphics API for all .NET platforms. And, here is where you will find all sorts of extras that you can use with it.
Stars: ✭ 118 (-94.58%)
Mutual labels:  cross-platform, dot-net
Zipstorer
A Pure C# Class to Store Files in Zip
Stars: ✭ 139 (-93.62%)
Mutual labels:  cross-platform, mono
Mud
Multipath UDP library
Stars: ✭ 100 (-95.41%)
Mutual labels:  network, udp
Solarnetwork
Elegant network abstraction layer in Swift.
Stars: ✭ 99 (-95.46%)
Mutual labels:  network, networking
Easyhttpcpp
A cross-platform HTTP client library with a focus on usability and speed
Stars: ✭ 110 (-94.95%)
Mutual labels:  networking, cross-platform
Packetsender
Network utility for sending / receiving TCP, UDP, SSL
Stars: ✭ 1,349 (-38.09%)
Mutual labels:  udp, cross-platform
Curlsharp
CurlSharp - .Net binding and object-oriented wrapper for libcurl.
Stars: ✭ 153 (-92.98%)
Mutual labels:  network, dot-net
Ecs
ECS for Unity with full game state automatic rollbacks
Stars: ✭ 151 (-93.07%)
Mutual labels:  network, networking
Protobuild
This project has been retired.
Stars: ✭ 153 (-92.98%)
Mutual labels:  cross-platform, dot-net
Ccna60d
60天通过思科认证的网络工程师考试
Stars: ✭ 155 (-92.89%)
Mutual labels:  network, networking

LiteNetLib 1.0 indev

Lite reliable UDP library for .NET Framework 4.7.1, Mono, .NET Core 3.1, .NET Standard 2.0.

Discord chat: Discord

OLD BRANCH (and examples) for 0.9.x

Little Game Example on Unity

Documentation

Build

NuGet NuGet NuGet

Release builds GitHub (pre-)release

DLL build from master

( Warning! Master branch can be unstable! )

Donations are welcome and will help further development of this project.

https://www.buymeacoffee.com/revx

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 (dual mode)
  • Connection statisitcs
  • Multicasting (for discovering hosts in local network)
  • Unity support
  • 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)

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) =>
{
    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.EndPoint); // 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();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].