The demo_chat application can not connnet to server

Acrab
edited July 2015 in Native
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

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.
    That is expected as PeerBase.cpp is closed source and not included in source form in the SDK.
  • 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?
  • 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.
  • eza
    eza
    edited June 2018

    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.

    I know this is a long bump, but does the chat demo work with photon server now?

    From what I can see, I will have to add chat functionality to the photon load balancing on premises server?
  • 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,
    ilya