Author Topic: iphone android connection problem  (Read 3201 times)

phoenix

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 49
    • View Profile
iphone android connection problem
« on: October 22, 2015, 12:47:21 AM »
I am testing connectivity with Tnet 2.1.1 on a local lan

I run 2 projects one as iphone the other as android

Unity 1__________Unity 2
---------------------------------
Android__________Iphone
---------------------------------
Host :) __________Client :)
Client   cannot see   Host
---------------------------------
Android_________Android
---------------------------------
Host :)  _________Client :)
Client :) _________Host :)
---------------------------------
Iphone__________Android
---------------------------------
Host  is not shown to Client
Client :) _________Host :)
---------------------------------
Iphone__________Iphone
---------------------------------
Host :)  ________Client :)
Client :) ________Host :)



phoenix

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 49
    • View Profile
Re: iphone android connection problem
« Reply #1 on: October 22, 2015, 01:07:35 AM »
I am not sure if this is relevant or anyone else experienced this but
when I switched from the TNUdpLobbyClient to the TNTcpLobbyClient

I was unable to join the my own local lan server because no known servers where found.


phoenix

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 49
    • View Profile
Re: iphone android connection problem
« Reply #2 on: October 22, 2015, 05:19:16 PM »
further testing pc android and iphone

Unity 1__________Unity 2
---------------------------------
Android__________PC (win,mac,linux)
---------------------------------
Host :) __________Client :)
Client :) _________Host :)

---------------------------------
Iphone__________PC (win,mac,linux)
---------------------------------
Host   no show  on Client
Client :) _________Host :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iphone android connection problem
« Reply #3 on: October 24, 2015, 05:07:28 AM »
I am not sure what your ... graphs? ... are supposed to represent, and I don't see a question...

TCP lobby client requires a central server to connect to -- the lobby server. UDP lobby client uses network broadcasts instead (but is obviously limited to LAN discovery only).

phoenix

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 49
    • View Profile
Re: iphone android connection problem
« Reply #4 on: October 24, 2015, 04:05:56 PM »
I am running 2 Unity Instances on a Mac, When I have one Unity Instance as a project type Iphone and it is the Host/Server
Then the 2nd Unity instance is unable to see the Iphone Host/Server when it is a project type of (PC, Android) However if it is also an Iphone project type then it can see and connect.

When the Host/Server is any other project type other than Iphone then all other project types that are clients are able to see it and connect to it.

I am only experiencing issues when the Unity project type is set to Iphone and it is Hosting/Server and another Unity Instance running on my local machine is set to a different project type.

My Question is
1) Does anyone else experience this bug?
2) Is there a fix for this bug?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iphone android connection problem
« Reply #5 on: October 27, 2015, 12:54:37 AM »
That would be because iOS uses broadcasts while others use multicasts. Check UdpProtocol.cs, line 28.

At the beginning of your app, simply set
  1. TNet.UdpProtocol.useMulticasting = false;