telling user "server not found"

Options
Hello!

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

Comments

  • Tobias
    Options
    We will take a look.
    Which values give you this result?
  • gnoblin
    Options
    I use a bit modifed example that comes with PUN (does this help? not sure what values you are talking about exactly).

    thanks,
    Slav
  • Tobias
    Options
    I would like to know the IP and port address you use. Either through the settings file (and ConnectUsingSettings()) or your own Connect() call.
  • gnoblin
    Options
    I use Photon Cloud,
    I didn't change the connection code, as far as I remember.

    I will be able to check this tomorrow!
  • gnoblin
    Options
    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. :)
  • Tobias
    Options
    :D
    Glad you remembered this detail about not having any internet connection.
    That's a case, I might be able to reproduce and test ;)
  • gnoblin
    Options
    Tobias wrote:
    :D
    Glad you remembered this detail about not having any internet connection.
    That's a case, I might be able to reproduce and test ;)

    any news on this ? :oops:
  • Tobias
    Options
    Not yet. Sorry.
  • Tobias
    Options
    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).