Jump to content

Disabling networking protocols...


Recommended Posts

I have never had an issue with 7 Days and people connecting to either me hosting (Steam Networking I assume) or my dedicated servers (Steam Networking is disabled by default and ports are forwarded). Recently I have seen a lot of complaints about users crashing servers and talk of disabling the Steam stuff or LiteNetLib stuff. Nowhere are these explained. I understand what Steam networking is. It tunnels the UDP game data over TCP. What is LiteNetLib? What would happen if I disabled both on a dedicated server? Is there some plain UDP networking built into Unity/7 Days which would work or do I need one or the other?

 

For those with dedicated servers who want to know how to disable these, you edit "serverconfig.xml" in Notepad or Wordpad (nano or vi/vim in Linux/Unix) and find the lines near the top.


    <!-- Networking -->
    <property name="ServerPort"                        value="26900"/>
    <property name="ServerVisibility"                value="2"/>

    <property name="ServerDisabledNetworkProtocols"    value="SteamNetworking"/>
    <property name="ServerMaxWorldTransferSpeedKiBs" value="512"/>

The port specifies the listening port. This is a two-pronged port. The base port (26900 here) is TCP, but you also need to forward 26900-26903 (four total ports) as UDP. This means you should only forward TCP 26900, but you should forward UDP 26900-26903.

 

Leave the visibility alone or read up on it. If you change it and your server cannot be joined, you were warned.

 

The "ServerDisabledNetworkProtocols" is what disables the subject of this topic. Dedicated servers should always disabled the SteamNetworking protocol. If you have Steam networking enabled, expect server problems.

 

The last option here is for players to download worlds they do not have yet. 512KiB/s is the default and around 1024KiB/s should be the max. I believe it caps out around 1300KiB/s even if you set it higher. Remember, this is PER USER. If you have ten users downloading at once, that would require your server to have 5120KiB/s upload speed.

 

So what is LiteNetLib and why would we disable it?

Link to comment
Share on other sites

litenetlib is used by unity.

 

its per user as for disabling or not, not everyone will have the same experience with either.

 

https://duckduckgo.com/?t=ffab&q=what+is+LiteNetLib&ia=web

 

all kinds of documentations/speculations out there.

 

i have tried both and had issues with both... so i leave my config setting to empty so game uses strongest/first available.

 

again its 50/50 as not all are the same. sorry cant help no further but there is the search.

Link to comment
Share on other sites

I was hoping a dev would respond since we have no documentation, but you're close enough for now. I do know what LiteNetLib is, but since it can be disabled, I was asking if there was a fallback. Also, the server config literally says this:


<property name="ServerDisabledNetworkProtocols"    value="SteamNetworking"/>    <!-- Networking protocols that should not be used. Separated by comma. Possible values: LiteNetLib, SteamNetworking. Dedicated servers should disable SteamNetworking if there is no NAT router in between your users and the server or when port-forwarding is set up correctly -->

In other words, if you can forward ports from your router to your server and you do that, you should disable Steam networking. If you cannot forward ports and are behind NAT and/or a firewall device, disable LiteNetLib. There is one MAJOR reason to do this. Using LiteNetLib allows the raw UDP data to stream directly from a client to a server and back. This results in a lower ping for people not on your LAN. Steam networking encapsulates UDP data in TCP packets. This increases ping for many reasons beyond the basic encapsulation that occurs, such as TCP retransmissions and the like.

 

A prime example of why Steam pales in comparison to raw UDP was easily distinguishable with Ark until recently. Before the stupid Epic Games release, server admins could allow raw UDP in (required port forwarding and the like) or use Steam networking. We used raw UDP and people had very low pings. When the Epic version released they did not give us admins a choice to shun Epic Games users. They forced us to disable UDP by removing it, so we only have Steam networking now. Pings are higher and rubber-banding occurs when packets get retransmitted. We hate it.

 

I was just unsure as to what would happen if both were disabled. Does Unity have some built-in networking like Unreal Engine, or will it require one or the other?

Link to comment
Share on other sites

You already gave an example for when litenetlib needs to be disabled on a server. So I don't think it is surprising that it can be done. The straightforward way would be a setting to enable one or the other protocol, no question about that.

 

My assumption is that those are the only two protocols available. Usually config files list every option available and programmers don't have a problem with config files having "impossible" settings, i.e. settings that would not work at all, like disabling ALL network protocols in a headless server.

 

Anyway, you could simply test it with a headless server, disable both settings and see if it even opens a port or is accessible. I'm pretty sure this will be the case.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...