Hi,
we are working on PVP game on iOS. User can turn off his wifi. Problem is that it took almost 10 seconds for client to realize that it was disconnected and getting OnConnectionFailed: TimeoutDisconnect.
We are using those values to set up photon:
I know I can use unity to detect if device is not connected to any network and disable any player interaction, but is there any better way to do this ?
we are working on PVP game on iOS. User can turn off his wifi. Problem is that it took almost 10 seconds for client to realize that it was disconnected and getting OnConnectionFailed: TimeoutDisconnect.
We are using those values to set up photon:
PhotonNetwork.networkingPeer.DisconnectTimeout = 5000;
PhotonNetwork.networkingPeer.SentCountAllowance = 9;
PhotonNetwork.networkingPeer.MaximumTransferUnit = 1500;
Immediately after turning off wifi I get this error:
Cannot send to: 159.8.0.205. An invalid argument was supplied.
UnityEngine.Debug:LogError(Object)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Plugins/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1444)
ExitGames.Client.Photon.<>c__DisplayClass138_0:<EnqueueDebugReturn>b__0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Plugins/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
Could it be somehow used to detect disconnect faster ? I know I can use unity to detect if device is not connected to any network and disable any player interaction, but is there any better way to do this ?