Socket problem
#1
hi friends,

i am new with python, but i have coded a simple client/server script that works fine on my pc. i tried to port on xbmc and i have a problem. every thing goes fine until 2nd pas:

def oncontrol(self, control):
global s
if control == self.botogravarara:
try:
s = socket.socket(socket.af_inet, socket.sock_stream)
except:
self.messageg("1.pass")
try:
s.connect((host, port))
except:
self.messageg("2.pass")

datos='hello'
try:
s.send(datos)
except:
self.messageg("3.pass")
try:
s.close()
except:
self.messageg("4.pass")

self.messageg("done!")

and of course, host and port are declared before. it can't send data, because the script shows "2.pass", "3.pass", "4.pass", "done!". it has connectivity with the pc (host) and it has the server on the correct port (i have ported the client script from the one i coded on the pc and it works)

i don't know what i'm doing wrong. i have shutdown the firewall, i can ftp, see the news on xbmc, see the weather...

any help would be welcomed. Wink thanks in advance.

pd: sorry, the post doesn't show tabs. they really exist on the program.

Logout Mark Read Team Forum Stats Members Help
Socket problem0