4 ms·
Random but related: does anyone know of a good library (in C#, Javascript, or really anything higher-level than C preferably) that implements this? By "this" I
by silverlight 10y ago
Random but related: does anyone know of a good library (in C#, Javascript, or really anything higher-level than C preferably) that implements this? By "this" I mean a UDP-based system capable of sending both "it's stale when it's sent" data that can be dropped if it's lost and "this must be delivered" messages that will be re-sent if not delivered?
I would need it for a Unity project, so if it's Unity-ready already that would be great, but honestly at this point I'm willing to just take what's out there as a starting point and work with it.
I did find this: https://community.unity.com/t5/Asset-Store/Open-Source-UdpKit-a-networking-library-for-NET-Mono-Unity/td-p/1553191 https://community.unity.com/t5/Asset-Store/Open-Source-UdpKi... but it's apparently unsupported now and the author has moved on to other things.
There are some other packages on the Unity Asset Store but most of them are focused around Unity-to-Unity communication, and I'm looking for something more generic (since my architecture is actually Unity-to-NodeJS currently).
- doctorpangloss 10y agoThe Unity team plans to release a C# package for UNET low level API after the release of 5.4.0. I would caution that while it's extremely straightforward to implement those two QoS channels, you would be essentially reimplementing LLAPI and all its quirks, including queue management for a single threaded architecture. If you are building something for mobile, consider the state of UDP support over AT&T, Verizon, T-Mobile and Sprint. It's poor. You will be reimplementing so much of LLAPI and Unity's relay servers that it may be more effective to port from NodeJS to Unity and run headless.
- corysama 10y agohttp://enet.bespin.org/ http://enet.bespin.org/ is C. But, it implements reliable|unreliable packet-based messages over UDP. You can have multiple "channels" active in a single connection. Each channel can independently pick a mode. Packet retries in a reliable channel do not delay packets in another channel.
- silverlight 10y agoCool, that looks perfect. Thanks!
- lallysingh 10y agoWebRTC Data Channels http://www.html5rocks.com/en/tutorials/webrtc/datachannels/ http://www.html5rocks.com/en/tutorials/webrtc/datachannels/ let you freely mix reliable and unreliable data. I donno if there's any bindings from the webrtc library to unity yet. EDIT: https://www.assetstore.unity3d.com/en/#!/content/47846 https://www.assetstore.unity3d.com/en/#!/content/47846
- 15155 10y agoTangentially: does anyone know of any great server-side implementations of this? So that a regular server could be a WebRTC peer?
- lallysingh 10y ago... it's peer to peer ... the server acts like a peer... the same code can run for both peers ... So you can choose any webrtc binding for any language you use server side.
- 15155 10y agoYes, sure. Incidentally, I haven't found any decent WebRTC bindings that aren't tightly wound to browsers.
- rdw 10y agohttps://github.com/lidgren/lidgren-network-gen3 https://github.com/lidgren/lidgren-network-gen3 This is a very mature library. Supports Unity despite not having an asset store package. It's got the same sort of channels/reliability model that enet and RakNet have, just implemented in C#.