telling user "server not found"
Options
gnoblin
✭
Hello!
I plug my network cabel off, run my game in Unity editor and see
and
How should I check if server cannot be connected to and inform the user accordingly?
void OnFailedToConnectToPhoton() callback doesn't seem to be triggered in this situation.
thanks,
Slav
I plug my network cabel off, run my game in Unity editor and see
Dns.GetHostEntry() failed: System.Net.Sockets.SocketException: No such host is known.
at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in <filename unknown>:0
at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.NConnect..ctor (ExitGames.Client.Photon.EnetPeer npeer, System.String ipPort) [0x00000] in <filename unknown>:0
and
StartConnection() failed: no ipAddress found.
How should I check if server cannot be connected to and inform the user accordingly?
void OnFailedToConnectToPhoton() callback doesn't seem to be triggered in this situation.
thanks,
Slav
0
Comments
-
We will take a look.
Which values give you this result?0 -
I use a bit modifed example that comes with PUN (does this help? not sure what values you are talking about exactly).
thanks,
Slav0 -
I would like to know the IP and port address you use. Either through the settings file (and ConnectUsingSettings()) or your own Connect() call.0
-
I use Photon Cloud,
I didn't change the connection code, as far as I remember.
I will be able to check this tomorrow!0 -
Just to make sure: I run the game WITHOUT any valid network connection (I plug the cable OFF) to simulate a similar situation that a player can have.0
-
Glad you remembered this detail about not having any internet connection.
That's a case, I might be able to reproduce and test0 -
Not yet. Sorry.0
-
I just changed our local versions to call OnFailedToConnectToPhoton() and the disconnect callback. So this will be taken care of in the next update (soon).
Unless you use a IP, you can cause the same behavior, if you misspell the server's address (name).0