The demo_chat application can not connnet to server
hi! I am a newer that just begin to learn Photon. I tried to run the demo "demo_chat" application, and it failed to connect to the server.and the error message is invalid application id format.(i don't know where to set the id)
Aside from this,I find it's debug message that had transfered PeerBase.cpp this file,but i can't find this.
can anyone help me? thanks
Aside from this,I find it's debug message that had transfered PeerBase.cpp this file,but i can't find this.
can anyone help me? thanks
0
Comments
-
Hi Acrab.
demo_chat has the following code:
[code2=cpp]static const JString appId = L"<no-app-id>"; // set your app id here[/code2]
in line 13 of main.cpp.
Please replace <no-app-id> with your App ID, that you can find in your dashboard at https://www.photonengine.com/en-US/Chat/Dashboard.Aside from this,I find it's debug message that had transfered PeerBase.cpp this file,but i can't find this.0 -
Hi Kaiserludi.
Thanks for the quick answer.
It's successful in connencting to photon cloud by changing the app-id.
Thanks for your help!
Can you tell me how can i connect to the local photon server?Is there a demo?0 -
Hi Acrab.
You can do that with demo_loadBalancing.
Please simply change the connect() call from
[code2=cpp]mLoadBalancingClient.connect();[/code2]
into
[code2=cpp]mLoadBalancingClient.connect(L"localhost", ExitGames::LoadBalancing::ServerType::MASTER_SERVER);[/code2]
The appID does not matter at all when connecting to Photon Server. It is only relevant for Photon Cloud.
Please also make sure that your local server runs the LoadBalancing instance and not the default one.
demo_chat won't work with the current release of Photon Server, as Photon Server does not support the Chat API yet. That will AFAIK change with Photon 4.0 -
I know this is a long bump, but does the chat demo work with photon server now?Kaiserludi said:Hi Acrab.
demo_chat won't work with the current release of Photon Server, as Photon Server does not support the Chat API yet. That will AFAIK change with Photon 4.
From what I can see, I will have to add chat functionality to the photon load balancing on premises server?0 -
hi, @eza
chat api and demo for it works only with cloud. if you will be able to simulate work of chat for it using photon server, then it will work. but then you have one more obstacle - lacking of nameserver in photon socket server sdk. Chat API uses it
Support of Chat API is not going to be released in near future
best,
ilya0