I am meeting some issues when using UNET on multiple devices on the same LAN using WIFI.
Here is my current setup:
I have a server hosted on Windows that I launch before everything else.
The server has a broadcast service to let LAN clients know how to connect to the server.
The server has also a lobby for players to join.
I then have a client on Windows too (the same machine) that I launch right after the server.
It gets the broadcasted message and then joins the lobby without any issue.
I finally have a client on Android that I launch after all of the others.
It also gets the broadcasted message and joins the lobby.
However, after some time, depends really on every trial I made, the Android client gets disconnected because of a timeout issue.
In order to verify that my code wasn’t in cause, I tried launching clients from several machines that all are on LAN Ethernet (not using the WIFI). It all worked perfectly with no disconnection.
I therefore wonder if my issue could be related to using WIFI or because making communicating an Android Client and Windows server and clients?
Unfortunatelly, I don’t have Windows machines to test connections over WIFI (all machines are desktop without any WIFI support) so I can’t confirm its a WIFI issue but it sounds like it…
I attached my Android device log file so that someone with a deeper understanding on UNET or low level networking could find out what’s going on…
This is driving me crazy as it simply blocks the core principle of the game I’m trying to develop…
It was LTE or WiFi? (sorry for this question, just to be sure)
Can you ping your android device? If yes can you attach results? (rtt + jitter) ?
Do I understand correctly, you have one (or more) PC which are connected via ethernet to router, and android device is connected to the same router via WI-FI?
No, they all are communicating through Wi-Fi. The other setups were some tests to try to identify if the issue was caused by the code, network or cross device communication.
hm report the problem please and attach your project (in minimal configuration) as well as description of all steps for problem reproducing. Without this I afraid I cannot help you:( (Something strange, as we definitely tested android)
I will prepare that this week-ebd abd submit the project. Where should I post that to?
Moreover, could you please enligth my ignorance letting me know how do you state if an idle server and client are still connected? Do you send periodical pings?
how do you state if an idle server and client are still connected? Do you send periodical pings?
yes full analogy with tcp - periodic (config.PingTimeout) keepalive packets
I think this is exactly what is the problem. But, what exactly needs to change?
I tried increase NetworkManager.MaxDelay from 0.01 by default, to 0.2(than tried to 2.0) , and tried change NetworkManager.connectionConfig.DisconnectTimeout form 2000(default) ms to 6000 ms. But nothing helped.