diasurgical / devilutionX

Diablo build for modern operating systems
Other
7.98k stars 781 forks source link

TCP server connection refused #6054

Closed Muleck closed 1 year ago

Muleck commented 1 year ago

Operating System

Android

DevilutionX version

1.4.1 (latest release)

Describe

Host on the ip with one android, then when i try to join with the another device it said "connect: connection refused"

To Reproduce

1.Host the tpc server on the device

  1. join on the server with another device

Expected Behavior

No response

Additional context

No response

DakkJaniels commented 1 year ago

Works fine for me. Sounds like it's a problem with your phone, or maybe you have the wrong IP address.

Muleck commented 1 year ago

i have everything right, The ip is correct, and my phone is working fine. I don't know what the actual problem is. Now it's working but only my phone can host for others to join. 50-50% they can join or refused. After 30 minute trying we made a session.

DakkJaniels @.***> ezt írta (időpont: 2023. ápr. 27., Cs, 18:52):

Works fine for me. Sounds like it's a problem with your phone, or maybe you have the wrong IP address.

— Reply to this email directly, view it on GitHub https://github.com/diasurgical/devilutionX/issues/6054#issuecomment-1526027997, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALELNUVQ3VTUBR7VSRVGJSLXDKP4LANCNFSM6AAAAAAXOCR7H4 . You are receiving this because you authored the thread.Message ID: @.***>

DakkJaniels commented 1 year ago

Is there a reason you need to use TCP vs. using ZeroTier? Also hosting TCP games on phone is not recommended. Without more information, this sounds more like an issue coming from outside the program.

Muleck commented 1 year ago

Yes, the reason is only TCP works, sometimes at least 50-50%. Zerotier not working on the same wifi for me, when i join the game crash.

StephenCWills commented 1 year ago

I ran a test hosting on Android and joining with a Windows 10 PC. I had 5/5 public TCP games successfully joined and 5/5 TCP games with passwords successfully joined. That's ten trials with a 100% success rate.

"Connection refused" occurs when the device that is connecting receives an RST packet from the remote system. This typically occurs when the remote system is not listening on the port that the client is attempting to connect to. It could also mean that you reached the wrong device on your network, like if you have an ambiguous network path, a firewall that refuses connections, or entered the wrong IP.

Also note that when you create a game, the game client hosts a TCP server for relaying packets between players, but also connects locally to its own TCP server as a TCP client to act as a remote player. If the phone were not listening on the port at all, game creation would have failed. It feels to me as if it's more likely that this is an issue with the network than with the Android device itself.

Since we're unable to reproduce, I'm going to assume there is nothing to be fixed in DevilutionX and close this issue. If you need guidance, feel free to share more information in this thread and maybe someone here can help point you in the right direction.