Connection from same machine
I have same problem as described in issue #10 from @tgardner851
I can connect from remote machine and all work's good, but when I deploy to server where game is running connection never finish, it does'n throw exception but stalls. I have B3Bot running on the same machine as the game and it is working, B3Bot uses rcon as well to communicate with the game.
Game is COD4, and I say again everything works when game is accessed from another machine.
I see now I neglected to post the solution to the problem. I suggest, instead of using your server's IP to connect, if you're on the same server use the local IP
IPHostEntry localhost = Dns.GetHostEntryAsync("127.0.0.1").Result;
Wow, thank you for following up @tgardner851!
Does this work for you, @brikibsw?
It's not working when I provide "127.0.0.1" because server is running on public ip address, it just says "Connection refused 127.0.0.1:28974"
Try other local IPs, maybe your internal network address (192.168.*.*)? That was generally my issue, the machine would query it's own public IP and then for whatever reason wouldn't connect. Using the local IP, your machine can target itself properly. I never really figured out why the public IP didn't work.
If you're running Windows Server, make sure your Firewall has exceptions for the port(s) you need.
I am running linux and on "eth0" is public ip and "lo" is 127.0.0.1, and firewall is down.
I have tried php code to connect to the game with same args (ip port pass) and it is working.
For some reason on ConnectAsync() method, which is called from constructor, packet received type (RCON.cs#L160) is PacketType.Response and not PacketType.AuthResponse and for that reason it hangs indefinitely.
So maybe it is not that it's running on same machine but on linux?