I can't connect to pc socket server with mobile socket client python

187 Views Asked by At

Hello I tried a simple server and client script on my pc. It was working perfectly but when I tried to connect with pc server with my mobile it is not working I can't connect to pc server with my mobile client

Nothing works I tried changing ip not working I tried changing my laptop internet connection not working I tried using a third party app it says couldn't connect to host and my server script is completely fine

1

There are 1 best solutions below

0
X3R0 On
  1. both devices will need to be on the same WLAN or Wifi Network.
  2. you will also need to get your PC's network IP Address (eth0 or your main network card), then you will need your server to listen on ip 0.0.0.0 with the port you want to use.
  3. Have a close look at your firewall and enabled outbound/inbound connnections for the port that you are using.

then you will need to put step 2's ip address as the server ip

then this should work