willneedit / Arteranos

VR social app in a decentralized server-client model
Mozilla Public License 2.0
2 stars 1 forks source link

LiteNetLib transport #171

Closed willneedit closed 2 weeks ago

willneedit commented 2 weeks ago

Mirror supports pluggable network transports, changing transports needs only changes for the connection establishment. For example, the Steamworks transport needs the Steam AppID, not an IP address.

And I'm seriously considering the LiteNetLib transport ( https://mirror-networking.gitbook.io/docs/manual/transports/litenetlib-transport ) -

Why?

  1. UDP, not TCP (maybe some changes for voice transport), lessens impacts of suboptimal networks
  2. Better adaptability to the user's network environments (like, MTU detection)
  3. NAT hole punching

The catch is, the latest of the Mirror's adaptation of LiteNetLib is from 2020 and from the 0.9.1 LiteNetLib codebase. LiteNetLib is at version 1.2.0 now.

Maybe I have to take the LiteNetLib Mirror as-is, and once it works, I'll have to update the undercarriage to improve, for example, the NAT hole punching.

For the end user?

Little. Better stability, and maybe less to think about - the router considerations would be gone.

willneedit commented 2 weeks ago

Just as I thought. The Mirror transport adaptation is horribly outdated.

Maybe it's easier to get the current version of LiteNetLib and write the transport interface on my own.

Bleh. ☹

willneedit commented 2 weeks ago

Easier and better than expected.

Benefits