A while back, I had no problem hosting and connecting to my own server using two instances of my game on the same computer. I use “localhost” as the IP. All of a sudden, when I try to connect to my own server I get this message:
Client Recv: failed to connect to ip=localhost port=7777 reason=System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it.
Even i have the same problem… When i try to connect to my server (using mirror) in another pc, it does not show any result or it just goes back to the main menu !!
I have also turned off firewall, and the same internet on both pc’s, but still no success =(
I tried to adjust some setting of network HUD and network manager settings but no results.
This is the error i get :-
Client Recv: failed to connect to ip=localhost port=7777 reason=System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it.
I dont understand this error, any help in fixing it would be nice !!
my problem is that the target machine actively refuses it i disabled firewall but still refused i can connect to my pc on a build and in editor but not on multiple computers… :-C
to fix this problem you need to put the IP of the other computer instead of the localhost and in the project settings the IP can be found in settings >> network and internet >> status >> properties >> IPv4 adress
Havent used mirror, but I guess that when you connect to “localhost” it connects to 127.0.0.1
If it works like that, you cant connect to other computers using that. You said that both computers are on the same network, so you need the ipv4 of the computer you are connecting to.
Again, I have never used mirror, but this is how it works on networking in general.
Having Same issue . Solution is simple just check out the ip address of Host machine and in client side replace local host with that ip address. for checking ip address command is ipconfig.