Downloading older versions of the Photon Client SDK

victor
edited September 2022 in Any Topic & Chat
Hi, I'm a developer looking for the older versions of the PhotonNDK. Right now I'm porting a large IOS project that uses an Older version of Photon and the server also uses a Older Version of Photon. I'm discovering:

-Changed Function calls
The IOS Photon SDK uses ExitGames::OperationRequest and the Photon-AndroidNDK_v3-2-2-0_SDK uses ExitGames::Photon::OperationRequest

-Missing header files.
Constants.h is available in the IOS SDK I'm using and missing in the Photon-AndroidNDK_v3-2-2-0_SDK

I believe the current IOS Photon SDK is Photon_iOS_v3-0-0-1_SDK so i'm hoping to get access to the Android NDK SDK ver that was available for download at the time. Is there a page/server to dl it?

Comments

  • We should try to get you up to date with the latest SDK, if possible. While the refactoring causes extra effort, we usually also improve stability and fix stuff, so v3.2. might still be the better option. The server and clients should be compatible with each version, so you should be able to mix.

    Stefan will soon be in and help you with the API specific questions. He also could provide you with the older SDKs.
  • We usually don't keep older versions available in our download area. However we can provide them upon request.
    victor wrote:
    The IOS Photon SDK uses ExitGames::OperationRequest and the Photon-AndroidNDK_v3-2-2-0_SDK uses ExitGames::Photon::OperationRequest
    We have changed that with the 3.0.4.0 release.
    However you can achieve the old behavior by adding
    [code2=cpp]namespace ExitGames
    {
    using namespace Photon;
    }[/code2]
    at the top of your code, right after the includes.
    victor wrote:
    Constants.h is available in the IOS SDK I'm using and missing in the Photon-AndroidNDK_v3-2-2-0_SDK
    This has been changed with the 3.2.0.0 release, but is considered to be an internal change.
    The officially recommended way is to just include PhotonPeer.h (or LoadBalancingClient.h instead, when your code is based on the LoadBalancing API). All other headers are then included by it automatically and your code doesn't have to care about which headers it needs and how they are named, so that you don't have to adjust to such changes.

    The API between the C++ Android and the C++ iOS clients is identical, as long as both clients are of the same version. Those differences that you can see, are between the 3.0.0.x and the 3.2.2.x API, not between platforms Android and iOS.

    Tobias is right: In general it's recommended to use an up to date version, so that you can profit from the latest new features, bugfixes, performance improvements, etc.
    3.0.0.1 is from February last year, which I would call rather old (we have released 26 updates for the C++ clients since).

    I am aware that it's not always possible to find the time for an update, especially when so much has been changed in between like in this case.
    However you should maybe think about at least updating to 3.0.3.11 (nearly all of the API changes since 3.0.0.0 have been done in 3.0.4.0 and 3.2.0.0, so updating your iOS clients to 3.0.3.11 should be rather trivial), because that is the first version with explicit support for Xcode 4.5 and dedicated iOS armv7 architecture binaries.

    I would provide you with a build of the 3.0.0.1 for Android NDK, but I am afraid that I can't do that, because at the time of 3.0.0.1 we have not supported Android NDK as client platform at all.
    The first AndroidNDK releases have been 3.0.1.0.PreAlpha and 3.0.1.1PreAlpha2, followed by 3.0.3.0.Beta, 3.0.3.1.RC1 and 3.0.3.2.RC2. The first stable release for AndroidNDK has been 3.0.3.8 from September last year.
    Therefor it probably makes the most sense (when updating your iOS clients to 3.2.2.0 currently is no option), when you go with 3.0.3.11 for both, iOS and Android:
    https://dl.dropboxusercontent.com/u/429 ... 11_SDK.zip
    https://dl.dropboxusercontent.com/u/429 ... 11_SDK.zip
  • Hi Kaiser and Ludi,

    Thanks for e continuous help. Right now the project doesnt seem to have a problem using Photon-iOS_v3-0-3-11_SDK or communicating with the current Server version, so I'll start using Photon-AndroidNDK_v3-0-3-11_SDK as well.
  • Hi,

    I've recently started work on a different porting project that uses Photon as well, but this time I'm required to use 'gnustl' instead of 'stlport' to compile my c++ codebase. My photon server setup is still remaining on the old version, so using the latest version of Photon AndroidNDK
    (Photon-AndroidNDK_v3-2-5-3_Cloud_SDK.zip) seems unfeasible (my current client-side photon setup is highly incompatible with the new libraries as well).

    Looking at this thread,
    viewtopic.php?f=8&t=2414
    it seems like an upgrade to a slightly later version (3.0.4.0) will allow use of gnustl while retaining current overall setup.

    Could you provide access to a version of PhotonAndroidNDK that retains compatibility and similarity to my current version, Photon-AndroidNDK_v3-0-3-11_SDK ?
  • If I do upgrade to the latest version of Photon Android NDK, how compatible is it with my current server version? (server version info below)-->

    == Core == PhotonSocketServer.2010 Win32 Unicode Release BuildDate: 2013-02-08 14:59:33 Version: 3.2.6.2037 SVN repository: photon-socketserver SVN revisions of... ... this project: 2037

    == SDK == BuildDate: 2013-02-08 15:19:37 Version: 3.2.10.4248 SVN repository: photon-socketserver-sdk SVN revisions of... ... this project: 4248
  • Hi Victor.

    All Photon 3 clients that we have released until now are compatible with all Photon 3 servers that are released until now at least aside from when you use very new features that have not been available at all in an older version.

    I am afraid that the differences between the Photon 3.0.3.11 and the Photon 3.0.4.0 clients are relatively big, so it might make sense to just upgrade directly to the most up to date version, if you have to upgrade anyway.
    However if you want to give a minimal update a try, here are the 3.0.4.4 SDKs:
    https://dl.dropboxusercontent.com/u/429 ... ud_SDK.zip
    https://dl.dropboxusercontent.com/u/429 ... ud_SDK.zip
  • Both 3.0.4.0 and the latest versions work fine. Thanks again for the quick support.
  • Hi, this is tangentially related to my posts regarding older versions of Photon.

    We've recently found out that our newer version of Photon client cannot connect to the current, older version of our Photon server via DNS, but our older version Photon client version can.

    Our Photon server version number(found in an earlier post as well):
    ++++++++++++++++++
    == Core == PhotonSocketServer.2010 Win32 Unicode Release BuildDate: 2013-02-08 14:59:33 Version: 3.2.6.2037 SVN repository: photon-socketserver SVN revisions of... ... this project: 2037

    == SDK == BuildDate: 2013-02-08 15:19:37 Version: 3.2.10.4248 SVN repository: photon-socketserver-sdk SVN revisions of... ... this project: 4248
    ++++++++++++++++++

    So, our 3.0.3.11 clients are able to connect to our server via DNS and direct IP connections, but our 3.2.5.3 clients can only connect via direct IP.
    If we try to do it via DNS naming, the callback on the client's local peer state does not change (stays at zero), while the Photon server does not receive any connection attempts. We've controlled for network etc. but the only difference we can find is the Client version.

    Any advice to offer?
  • Hi Victor.

    Since 3.2.5.0 dns resolution is done in a separate thread, as gethostbyname(), which we are calling for dns resolution, will block until dns resolution has been finished, which under certain conditions may take too long. It looks like somehow this is not working correctly for you.

    Do you experience this behavior on both, iOS and Android or only on one of them? In the simulator or on device or on both and in device only case, on which device model? Is this reproducible with the demo or does it only happen in your game?
  • Hi Kaiserludi,

    We are encountering the behaviour on both the IOS simulator and Android devices. So far we've not tested on other configurations. Originally we connected in the format below:

    mPhotonPeer->connect( L "dnsname.xxx.xx.net:5055", (nByte*)"XYZ); //Doesnt work on 3.2.5.3 works on 3.0.3.11
    mPhotonPeer->connect( L "123.123.123.123:5055", (nByte*)"XYZ"); // Works fine on both

    When you mention gethostbyname, is it now being called internally by photon, or are we supposed to call the posix version of it and feed the resulting IP to photon? Right now we've tried switching to calling the posix version and this works fine right now.

    void PhotonLib::connect(void)
    {
    struct hostent* remoteHost = gethostbyname("dnsname.xxx.xx.net");
    int i = 0;
    char **pAlias;
    struct in_addr addr;

    std::string firstIP;

    if (remoteHost)
    {
    CCLOG("\tOfficial name: %s", remoteHost->h_name);
    for (pAlias = remoteHost->h_aliases; *pAlias != 0; pAlias++) {
    CCLOG("\tAlternate name #%d: %s", ++i, *pAlias);
    }
    CCLOG("\tAddress type: ");
    switch (remoteHost->h_addrtype) {
    case AF_INET:
    CCLOG("AF_INET");
    break;
    // case AF_NETBIOS:
    // CCLOG("AF_NETBIOS");
    // break;
    default:
    CCLOG(" %d", remoteHost->h_addrtype);
    break;
    }
    CCLOG("\tAddress length: %d", remoteHost->h_length);

    i = 0;
    if (remoteHost->h_addrtype == AF_INET)
    {
    while (remoteHost->h_addr_list != 0) {
    addr.s_addr = *(u_long *) remoteHost->h_addr_list[i++];
    CCLOG("\tIP Address #%d: %s", i, inet_ntoa(addr));
    if (firstIP.length() == 0)
    {
    firstIP = inet_ntoa(addr);
    firstIP += ":5055";
    //break;
    }
    }
    }
    // else if (remoteHost->h_addrtype == AF_NETBIOS)
    // {
    // CCLOG("NETBIOS address was returned");
    // }
    }
    else
    {
    CCLOG("\tCannot resolve hostname");
    }

    #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
    mPhotonPeer->connect(firstIP.c_str(), (nByte*)"XYZ");
    #elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
    mPhotonPeer->connect(firstIP.c_str(), (nByte*)"XYZANDROID");
    #endif
    }
  • Is gets called internally, when you pass in an url and not an ip, both in the old and in the new version.
    It seems that in the new version the internal call to gethostbyname() does not work for you like it should.
    Does mPhotonPeer->connect( L "dnsname.xxx.xx.net:5055", (nByte*)"XYZ); work for you in 3.2.5.3 with the demo from the SDK?
  • We've not tried using the demos thus far, thus we've no answer for that. In any case, we've decided to stick with our current fix for the time being due to time constraints on both client and server ends. We'll come back to this thread again should stuff change. Thanks for the help thus far.
  • how to download pun2 version 2.22 for unity

  • I replied to the thread you opened on top of this. Please don't crosspost.

  • ethanhawe
    ethanhawe
    edited September 2022

    it is also difficult for me to download it's older version...But I hope I will find a way after joining this forum to easily download older version...

  • We don't provide it, sorry. Even the latest version is beginning to age, as we don't update PUN 2 frequently anymore. Please use the latest.

This discussion has been closed.