Extreme (un-real) RoundTripTime on iOS SDK

edited January 2013 in Native
I am upgrading a game from Photon 2.x to 3.x and on the iOS client (obj-c) the peer.RoundTripTime is extremely high and drops negative sporadically as well. It in fact does not even look anything like a "ms" measurement. Even if I divide it by a million, it does not appear to be correct (still too high). Did this number change in some way for iOS? Should I divide it by 10 million to "fix it", but even that seems off as on Android on the very same network I get 50ms to 60ms? The values I get back on the Android client all look like real "ms" measurements. Here are some values I'm seeing as output from the log on iOS:
2013-01-21 15:16:44.583 AppTest[359:907] roundTripTime:2104889886 roundTripTimeVariance:148645840
2013-01-21 15:16:49.583 AppTest[359:907] roundTripTime:2104889886 roundTripTimeVariance:148645840
2013-01-21 15:16:54.585 AppTest[359:907] roundTripTime:1827034617 roundTripTimeVariance:529998448
2013-01-21 15:16:59.583 AppTest[359:907] roundTripTime:1650920899 roundTripTimeVariance:705697843
2013-01-21 15:17:04.585 AppTest[359:907] roundTripTime:1488302228 roundTripTimeVariance:813856056
2013-01-21 15:17:09.582 AppTest[359:907] roundTripTime:1341686028 roundTripTimeVariance:-206771431
2013-01-21 15:17:14.582 AppTest[359:907] roundTripTime:1394566618 roundTripTimeVariance:59185120
2013-01-21 15:17:19.583 AppTest[359:907] roundTripTime:1235571925 roundTripTimeVariance:251450047
2013-01-21 15:17:24.586 AppTest[359:907] roundTripTime:1101207526 roundTripTimeVariance:423725235
2013-01-21 15:17:29.584 AppTest[359:907] roundTripTime:1173926583 roundTripTimeVariance:418375702
2013-01-21 15:17:34.586 AppTest[359:907] roundTripTime:1040641836 roundTripTimeVariance:547030084
2013-01-21 15:17:39.583 AppTest[359:907] roundTripTime:1117491434 roundTripTimeVariance:476976739


  • Hi Josh.

    Nice to hear that you have found the time to update your Photon version.

    Thats the first time that I hear about this issue and I could not reproduce it with our iOS obJC demos. Its still ms and depending on the network and how often you call service() values between 2-3 and a few hundred ms should be normal.

    Could you provide us with a minimal reproduction case, please?
  • Kaiserludi wrote:
    ...Could you provide us with a minimal reproduction case, please?

    Hi, thanks for the quick reply. I believe this is happening because of a change to TCP instead of UDP. You can see the same results in the "demo_iPhone_realtime_objc". Here is what you change to see it:

    In PhotonDemo.m, change from:
        m_pLitePeer = [[LitePeer alloc] initWithPhotonListener:self :false];
        m_pLitePeer = [[LitePeer alloc] initWithPhotonListener:self :true]; //true for TCP

    I then changed the port, but also had to change the AppName to connect to for our server as our default is different, but I would think this is not be required to test. I changed from:
        [m_pLitePeer connect:[NSString stringWithUTF32String:L"MYSERVERNAME:5055"]];
        NSString *appName = @"Lite";
        unsigned char *appNameC = (unsigned char *)[appName UTF8String];
        [m_pLitePeer connect:[NSString stringWithUTF32String:L"MYSERVERNAME:4530"] :appNameC];

    That is it, then when I run it on my iPod Touch it clearly shows the bad values in the demo.
  • Thanks.

    I could reproduce it now.

    We will track this down and provide a fix asap.
  • We have just released a bugfix for this issue in our donwloadareas.
    Please update to and thank you for pointing us to this.
  • Kaiserludi wrote:
    We have just released ... ...
    Thank you for the very quick fix. You guys are the best by far. I'm always impressed by how quickly you respond to everything and keep things moving forward. I have applied the update and can confirm it fixed it.

    Thanks again,
  • Thanks for the feedback and the compliment :-)
Sign In or Register to comment.