Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: nidhi_singh on May 15, 2015, 09:07:31 AM

Title: Hosting lobby on mobile hotspot and Internet problem while joining server
Post by: nidhi_singh on May 15, 2015, 09:07:31 AM
Is it possible to host a game server using mobile hotspot? if so can someone please tell me how to do that AND
I am able to host a lobby without internet connection but another device is unable to find it though both are connected to same router. I want host a lobby which works with or without internet connection and players are able to play on that. I am using server based on TNet Example Menu.
Title: Re: Hosting lobby on mobile hotspot and Internet problem while joining server
Post by: ArenMook on May 22, 2015, 05:39:18 PM
The router you are connected to may or may not allow UDP traffic. LAN discovery implies UDP. Furthermore, check UdpProtocol.useMulticasting -- it defaults to different values depending on the platform.
Title: Re: Hosting lobby on mobile hotspot and Internet problem while joining server
Post by: nidhi_singh on May 25, 2015, 03:32:20 AM
after setting UdpProtocol.useMulticasting to false its detecting server while Internet connection is not present. but there is huge delay before server shows up 3-5 mins is there any way to reduce that time. form your example menu whenever WAN is resolving user is unable to find server even though they are connected to same network.  is this problem because server is tcp+udp ??

If I host using Mobile hotspot, other player is still unable to detect it.
Title: Re: Hosting lobby on mobile hotspot and Internet problem while joining server
Post by: ArenMook on May 26, 2015, 03:22:00 PM
LAN discovery works by using UDP LAN broadcasts. Hotspot may not allow such packets.

Packets that are sent over LAN arrive instantly. Nothing will cause a 3-5 minute delay. Ever. Even sending a packet to the moon will take a fraction of that time. Off the top of my head, the server will either show up or it won't, but nothing can possibly cause a packet to be delayed by that much.

Have you tried setting useMulticasting to 'true' instead? If broadcasts are not supported properly, multicasting might be. If neither are supported properly, then discovery won't work.
Title: Re: Hosting lobby on mobile hotspot and Internet problem while joining server
Post by: nidhi_singh on May 29, 2015, 01:49:53 AM
Yup, I tried Both UdpProtocol.useMulticasting true and false. I am getting same result, server gets discovered but after some delay.