Vbrawl
Vbrawl

Reputation: 77

socket not connecting

I made a python program for PC remote controlling and when I use the socket.gethost() to get the ip for the server it works fine but if I use 192.168... it does not even connect (the PC's are on the same wifi though).

I think the code is correct because if I try to connect the same PC as a host and as a client it works normally, so I wanted to know what ip I should use and if I want to use it on different Wi-Fi's what should ip should I use?

If you need the code just ask.

I use Kali.

Upvotes: 1

Views: 60

Answers (1)

Theolin Nadasen
Theolin Nadasen

Reputation: 66

for the bind address on the server file use 0.0.0.0 if you want to connect to it from a different device. then use its ip 192.168... to connect from the other device.

Upvotes: 1

Related Questions