Self Hosted Server for UE4 Demo - PhotonDemoParticle
Hi
Could someone from Photon advise me why the PhotonDemoParticle does not work with the on-premise (self-hosted) photon server. I am trying to get some ideas on what the server is doing in the UE4 demo but it seriously is looking like the functionality is hidden from our eyes in the off-premise cloud based photon server.
Please assist if possible and thanks.
Regards
petergpls
Could someone from Photon advise me why the PhotonDemoParticle does not work with the on-premise (self-hosted) photon server. I am trying to get some ideas on what the server is doing in the UE4 demo but it seriously is looking like the functionality is hidden from our eyes in the off-premise cloud based photon server.
Please assist if possible and thanks.
Regards
petergpls
0
Comments
-
Hi @petergpls.
No, there is no hidden server side functionality in the demo app. It works with a self-hosted Photon Server just as well as with Photon Cloud.
Unfortunately you have not provided information about what exactly is not working for you, so I have to guess.
Gotchas that you need to be aware of when connecting to a self-hosted server with a Photon Cloud compatible client app:
1.
Make sure that you run the default app on the server.
2.
On the client sideClient::connect()
has 4 parameters. All of them have default parameters in case you don't pass anything for them. The third parameter is the server address and the fourth is the server type.
For Photon Cloud the default valuesL"ns.exitgames.com"
andServerType::NAME_SERVER
are the correct values.
For Photon Server however you need to pass the address of the machine on which you run your master server (if you have changed the port number in the master server config file, then you also need to include the port number in the address string as otherwise the default port number for the used connection protocol is used) andServerType::MASTER_SERVER
.
My shot in the dark without further information would be that you have not set the server type.
Also if you pass an IPv6 format, make sure to include the square brackets.
Quote from the API reference-doc ofClient::connect()
at https://doc-api.photonengine.com/en/cpp/current/html/a05318.html#afd3f9e5696c77fa52bb924b64518243b:
serverAddress
A null terminated string containing the IP address or domain name and optionally the port number to connect to. IP addresses can be in IPv4 or IPv6 format, examples: "192.168.0.1", "192.168.0.1:5055", "udp.gameserver.com", "udp.gameserver.com:5055", "[2002:C0A8:1::]", "[2002:C0A8:1::]:5055". Note that IPv6 addresses must include square brackets to indicate where the address itself ends and the port begins. If no port is given, then the default port for the chosen protocol and server type will be used.
serverType
One of the values in ServerType. Must match the type of the Photon server that is reachable at the given address and port. Should be ServerType::NAME_SERVER for Photon Cloud and ServerType::MASTER_SERVER for self-hosted Photon Server instances. You should NOT directly pass the address of a regions master server with Photon Cloud, but always connect to the name server.0