Grant Edwards wrote: [...] > import socket,random > > HOST = '' # Symbolic name meaning the local host > PORT = 8765 # Arbitrary non-privileged port > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.connect((HOST, PORT))
Actually the empty string passed for the host means INADDR_ANY, which does not really make sense for the client. On my Win-XP system, the client fails with socket.error: (10049, "Can't assign requested address") For the loop-back adapter, 'localhost' or '127.0.0.1' should work. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list