Author Topic: IOS Lan server list issue  (Read 4040 times)

anthonyk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
IOS Lan server list issue
« on: February 19, 2015, 04:28:55 AM »
Hi !

We have some issues testing the sample scenes on ios devices :
- We start tne demo menu on an Android tablet, a PC, a iPhone 5C ios7 and an iPad 4 ios7.
- We create a local server on all 4 devices.
- PC and Android saw there 2 servers. But ios devices didn't shown any servers even theirs. No list was displayed.
- If I enter the local address of the iphone or ipad on the PC i'm able to connect and play. and vice versa.
 
We are using a local wifi network only, no 3G.
I displayed all logs of TNET on screen but found no errors.
I used RemoteBrain to debug the scene remotly as well.
XCode gave no errors neither.
I displayed the TNLobbyClient.knownServers.list.size on Update(),  but it's stayed at 0.

So the only thing not working on ios seems to be the server discovery feature ?

Have you experienced this ? What could be wrong with ios ?

Thank you for your help !

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: IOS Lan server list issue
« Reply #1 on: February 19, 2015, 05:30:30 PM »
LAN server discovery in the example is done using UDP broadcasts or multicasts. I vaguely remember something about UDP broadcasts not working on iOS a while back... or was it multicasts? TNet has an option to switch between them -- UdpProtocol.useMulticasting. Try turning it off before using UDP.

anthonyk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: IOS Lan server list issue
« Reply #2 on: February 20, 2015, 03:50:09 AM »
Thank you,
UdpProtocol.useMulticasting = false;  seems to be a solution for ios.
With this configuration I now have a PC that doesn't find other servers. This computer only find servers when Multicasting is true for it and other devices.
This is quite weird.
But I will stay with broadcasting if it's working with ios devices at least.

Is there any other way I could try ? Tcp instead of udp ?

Thank you again ;)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: IOS Lan server list issue
« Reply #3 on: February 21, 2015, 08:31:39 AM »
TCP will work perfectly if you have a central "meeting server", like I do with both Starlink and Windward.