Author Topic: Hosting lobby on mobile hotspot and Internet problem while joining server  (Read 4626 times)

nidhi_singh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
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.

nidhi_singh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
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.

nidhi_singh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Yup, I tried Both UdpProtocol.useMulticasting true and false. I am getting same result, server gets discovered but after some delay.