Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handshake logic for negotiating closest network IP to peer #460

Open
ConnorBP opened this issue Sep 6, 2024 · 0 comments
Open

Add handshake logic for negotiating closest network IP to peer #460

ConnorBP opened this issue Sep 6, 2024 · 0 comments

Comments

@ConnorBP
Copy link

ConnorBP commented Sep 6, 2024

Currently matchbox always connects peers via public IP Address. I propose an extra step is added to the handshake process to detect peers located on the same LAN or WAN networks, perhaps via MAC address of the router / modem, then the process can proceed to connect the peers via the local address with a fallback to the external on fail.

Reasons:

  1. Some college campuses and business networks block incoming connections on their firewalls, thereby breaking peer to peer connections over external IP's
  2. When two people play on the same network, connecting over the internet may add unnecessary latency and points of failure.
  3. I'm sure there are other reasons I am forgetting at the moment

Other potential solutions to number 1 would involve using a relay server of some kind. This kind of defeats the purpose of peer to peer, but could be a good fallback option. In general more fallback options is good to have.

Side note: when the peers are set together and the traffic between them never starts, matchbox never fails (or perhaps fails silently). Some kind of error handling or timeout on new peer connection would also be a welcome addition to this handshaking process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant