spacemeowx2 / switch-lan-play

Enjoy games with your friends as if you were on a LAN.
GNU General Public License v3.0
1.81k stars 190 forks source link

Using TCP instead of UDP #131

Closed jpoep closed 2 years ago

jpoep commented 2 years ago

Is it possible for the client to use TCP packets to communicate with the server instead of UDP? One of our players has seriously bad internet which causes his connection to drop in the middle of Pokemon battles when using lan-play. It's just a wild guess that this is due to lan-play using UDP, but I figured it would be the most reasonable explanation (referring to the diagram at the top of the readme).

Is there a reason that UDP was chosen over TCP for handling these connections?

spacemeowx2 commented 2 years ago

It's impossible to use one single TCP stream instead of UDP. If you look through the git log you will see that I started out using TCP as the connection, but using TCP makes it almost impossible for the game to connect.