demo example not able to connect from MAC to windows server

Options
Paresh
edited October 2012 in Native
Hi,

I have setup Photon server on Windows machine which is in LAN with my MAC .

I open demo example hello world (or any other example provided with Photon-iOS_v3-0-3-4_SDK) in Xcode, when I run it in Simulator it fail to connect with server which is on Windows Machine. I tried running all other example but nothing works. I have already change the IP address from "localhost" to that of server machine IP address with same port 5055.

on loadbalancing example I am getting this error code 1039, after checking I found it as :
SC_INTERNAL_RECEIVE_EXCEPTION 1039 // Exception, if a server cannot be connected. Most likely, the server is not responding. Ask user to try again later.

I tried cleaning build, restarting device but nothing is working out.

can you please help me, I am not getting what to do.

Thanks & Regards,
Paresh

Comments

  • Kaiserludi
    Options
    Hi Paresh.

    Have you checked, if you can connect to the server with a local test client on the same machine?
  • local test client by right clicking on Photon icon in taskbar- yes I checked & it's working fine. but I didn't run any of the example code on windows machine from demo examples since for that I will have to install WP7/marmalade client on the same server machine I guess, which is not possible for now. any other idea which I can use to check connection between MAC Client machine (for example iOS simulator) & Photon server on windows machine?

    thanks
  • Kaiserludi
    Options
    You can also download the win32 client SDK (which just needs to run on a machine with 32 or 64 bit windows os, no further requirements (although we have never tested it on any older OS than XP, but the Photon server needs XP or newer anyway)) and run the demos from that one locally on the server. The C++ demos inside it are aside from the UI identical to the ones from the iOS client SDK and use exactly the same client side API as the iOS C++ clients. iOS hello World is a C++ demo, so if the win32 hello World demo is running fine locally, you definitely have an issue with accessing your server from other machiens and not an issue with the client SDK.
    In that case after doublechecking the ip specified in the client to be the local network ip of your server and after restarting the Photon server in the Photon control to be sure, that its listening to the correct local network IP, I would check the firewall settings of the server machine: If the windows builtin firewall is active, then you have to explicitly allow port 5055 for udp and port 4530 for tcp (in case of running the loadBalancing server instance additionally also ports 5056 and 5057 for udp and 4531 and 4532 for tcp) for the Photon service in the firewall. For 3rd party firewalls this may also be true.
  • thanks for your reply, I tried what you said & it did work on simulator(not checked for device yet)
    but the "real time" example of C++ not working, I am working with cocos2d-X so trying for that only. other demo examples of hello world & hello world advanced did worked, even objective C version of "real time" example work very well on simulator.

    Do you have any idea why C++ real time example is not working or it's a bug in that example?
    issue is real time C++ example never able to connect to the server. I am planning to use "real time" Photon example as standard for my game so it will be great if you can help me as early as possible.

    Thanks,
    Paresh
  • Kaiserludi
    Options
    Have you double-checked the server address?
    When helloWorld, advanced and obj C realtime work, then C++ realtime definitely should work, too, as it needs the same server config.
    We are not aware of any bugs in the current SDK release, that should prevent it from connect.
  • thanks Kaiserludi, it worked. :-)
    I did what I kept as a last option... delete everything & downloaded client sdk for iPhone again. I was doing so many changes from last few days, that's why decided to start again from zero in client side & that worked as expected. Now I will start implementing photon C++ with my actual Cocos2d-X iPhone game, will get back to you in case of any problem. (I know you will help out as you always do)

    Thanks once again, you are great help for multiplayer newbie developer like me.

    -Paresh
  • I am working with cocos2d-X so trying for that only. other demo examples of hello world & hello world advanced did worked, even objective C version of "real time" example work very well on simulator.
  • Kaiserludi
    Options
    steward15 wrote:
    I am working with cocos2d-X so trying for that only. other demo examples of hello world & hello world advanced did worked, even objective C version of "real time" example work very well on simulator.
    The C++ realtime demo differs from the other mentioned demos in the fact, that its url is not set in code, but in the onscreen config. Please make sure, that you provide the correct ip:port combination there.