Photon China connection setup from a client perspective with a separate server.

What are the things needed to be done on the client-side to connect to the China server that was set up by another device manufacturer?


Given:

  • IP address of the Photon server they own and control.


Do we need to hook up and modify specific Photon connections with different ports like for nameserver, masterclient and gameserver?

Do we need to use our own app ID or just leave it blank?


Thanks

Best Answer

  • Tobias
    Tobias admin
    Answer ✓

    If anyone runs their own server, it does not matter where that is. It's your own server and you need to configure the client to connect to that.

    In best case, they are running a Photon v5 server with a Name Server and have all 3 server types configured and available to connect to. This is the recommended setup.

    Try by configuring the client as if their IP is their Name Server. You can use the PhotonServerSettings file to do this in PUN.

    In a v5 server, they should setup an AppId, afaik. That's more a "server" question.

Answers

  • Is there a quick link on how to set up or what to change on the Photon client side given a photon server IP in China so that it would be compatible with connecting to a China server using Photon PUN?

  • They have not given any APP ID's only the IP Address. Is this ok?

    So I only need to process these and it should work fine? No additional setup.

    I noticed that there is only one port but they referred us to 3 ports. Where do I need to set up those if necessary?


    AppSettings chinaSettings = new AppSettings();
        chinaSettings.UseNameServer = true;
        chinaSettings.ServerAddress = "ns.photonengine.cn";
        chinaSettings.AppIdRealtime = "ChinaPUNAppId"; // TODO: replace with your own PUN AppId unlocked for China region
        chinaSettings.AppVersion = "ChinaAppVersion"; // optional
        PhotonNetwork.ConnectUsingSettings(chinaSettings);
    


    Thanks.

  • Tobias
    Tobias admin
    Answer ✓

    If anyone runs their own server, it does not matter where that is. It's your own server and you need to configure the client to connect to that.

    In best case, they are running a Photon v5 server with a Name Server and have all 3 server types configured and available to connect to. This is the recommended setup.

    Try by configuring the client as if their IP is their Name Server. You can use the PhotonServerSettings file to do this in PUN.

    In a v5 server, they should setup an AppId, afaik. That's more a "server" question.