Sockets: code works locally but fails over LAN

John Hazen john at hazen.net
Wed Aug 31 21:51:02 CEST 2005


* n00m <n00m at narod.ru> [2005-08-31 05:45]:
> import socket, thread
> host, port = '192.168.0.3', 1434
> s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s2.connect((host, 1433))
> s1.bind((host, port))

I think the problem is that you're using the same host for both the send
and recieve sockets.  Wouldn't you want one host to be the localhost,
and one to be sql server?

If it doesn't work even when only the VBscript is on a different box,
are you running an OS with a firewall that you have to disable?

-John



More information about the Python-list mailing list