How to configure self-hosted server using a public Game server IP?

Options
I've been scouring the forums for answers, but haven't found any. I'm using SDK v.4, and simply trying to get the test client to connect using a public IP. It works fine on the local, but not on public or auto. When it tries to connect the test games I get this error:

OnOperationReturn: JoinGame failed: ReturnCode: 32758 (Game does not exists).

for all of them. I forwarded port 5055, and set up a static IP. I've also created new rules in Windows 10 firewall to allow connections on this port. Help with the config file setup and/or port testing and/or just a full tutorial would be really helpful.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Foreignwaffles,

    Thank you for choosing Photon!

    Here is how to configure the Game Server IP.

    The default GameServer UDP port number is 5056.
    Please double check the required ports here.

    OnOperationReturn: JoinGame failed: ReturnCode: 32758 (Game does not exists).

    I think this error means that the GameServer is properly configured and that the client was able to reach the GameServer but the room was closed meanwhile (no longer exist) or is invisible or was not created at the first place (join request was sent before creation request).
    Did you try "OpJoinOrCreate"?
  • Thank you @JohnTube ,

    Would you recommend forwarding port 5056? And I believe that the join request was sent before the create request, so where should I use OpJoinOrCreate?

    I am just using the LoadBalancing TestClient for now.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2017
    Options
    I see! The StarDust test client available from Photon Control has this known issue of trying to join games before they are ready to be joined. The clients created by the test are faster than the server especially with nowadays' fast computers. We will try to tweak the values.

    Would you recommend forwarding port 5056?


    I think that's not necessary for now.

    And I believe that the join request was sent before the create request, so where should I use OpJoinOrCreate?


    Please try with a small application of your own first with OpJoinOrCreate only then try to organize your code so that you create then join. Of course you can always use OpJoinOrCreate.
  • Thank you! I'll test out an app of my own and get back.
  • @JohnTube When I tested out my app, I got it to connect to the masterserver, which then shuttled the client over as it should. However, when it tries to connect to the gameserver at my public IP, it immediately calls CSharpSocket.Disconnect(). Any known solutions?

    As for OpJoinOrCreate, it was attempting to join before creating, so I set up my code to create a room on joining the lobby, but that is happening before attempting to connect to the game server. Is this correct?