Jump to content

hey everyone I 'm trying to make a program in python that i can use to run scripts on my compute...


G+_Benjamin Breüner Frost
 Share

Recommended Posts

hey everyone I'm trying to make a program in python that i can use to run scripts on my computer using my phone or some kind of other device. it is made up of a server and a client, and it is the client i have problems with.

 

the client works fine when i use it on my computer. but on the phone it says "s.connect((host, port))

File "", line 1,in connect

socket.error: [error 110] connection timed out. "

 

i think the problem comes because i use python27 on my computer and sl4a on my phone uses python26. but i can't really find out what it is and i would be very happy if someone could help me fix it.

 

the code is on github here https://github.com/benjamin1313/scriptLauncher/blob/master/scriptLuncherClient.py

Link to comment
Share on other sites

host = "localhost"

port = 5070

 

This will work fine if both client and server are running on the same machine.  Not if they are on different machines. If the phone is running its own service on port 5070, your client will try connecting with that instead.

 

Did you remember to change "localhost" to the hostname or IP address of the computer on which the server is running?

Link to comment
Share on other sites

 Share

×
×
  • Create New...