Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
141 stars 2 forks source link

Integrate ENet transport protocol #1362

Open Frooxius opened 9 months ago

Frooxius commented 9 months ago

Is your feature request related to a problem? Please describe.

We're currently relying on the LiteNetLib library as the network transport protocol, for both unreliable and reliable transfers. The performance of the library can sometimes cause issues, such as packet queuing and Steam Networking Sockets, which is currently lacking bandwidth estimation.

Describe the solution you'd like

Resonite supports hosting sessions on multiple protocols, which makes adding additional protocols relatively easy.

ENet is a commonly used library in game development and could provide better robustness and performance.

There are C# wrappers which include modified versions with IPv6 support: https://github.com/nxrighthere/ENet-CSharp

There are some challenges too:

Describe alternatives you've considered

We are also looking into making changes to LNL library, such us changing the window size and implementing additional features, like late packet aggregation and dynamic window size changing, which might alleviate the problems altogether.

Additional Context

It's not actually known if this library would behave better overall network performance, so the implementation time carries a risk of being a wasted effort.

Requesters

No response

iamgreaser commented 9 months ago

Is there a suitable C# implementation of STUN? That could potentially save on a bit of work in terms of tunnelling.

Although then again, ENet does blur the line between a client and a server, so having a "server" establish a peer connection to one or two servers to perform hole-punching (or determine the infeasibility of it) might work.