Changing internet from wifi to phones internet

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
ekrem5353
Posts: 111
Joined: 10 Dec 2015, 15:50

Changing internet from wifi to phones internet

Postby ekrem5353 » 14 Oct 2020, 13:57

Hi,

When users are online, is there a way to change wifi without getting disconnected? For example when user is playing game with wifi turns down wifi and User's cell phone uses its own internet. is there a way to going from one to other without getting disconnected?

Thanks
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Changing internet from wifi to phones internet

Postby Lapo » 14 Oct 2020, 17:02

Hi,
to answer you I'll quote a post from a similar question on Stack Exchange:

A TCP connection cannot be kept alive during a network change, since you get a new IP address, causing all connections being terminated.

TCP builds upon IP to get the data delivered. If you change networks you also change your public IP address which is used by the TCP connection to let TuneIn deliver data to you. This invalidates the current connection and forces you to establish a new one.

Source:
https://android.stackexchange.com/quest ... k-provider

If you want to learn more about this topic we wrote two extensive articles on the subject:
https://smartfoxserver.com/blog/what-re ... tworkwifi/
https://smartfoxserver.com/blog/handlin ... e-devices/

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 20 guests