socket freezes
jordan.taylor2 at gmail.com
jordan.taylor2 at gmail.com
Fri Mar 3 23:43:20 EST 2006
Might want to check out the SO_REUSEADDR bit in sockets. I believe it
helps with a problem of a program not notifying the OS that it's done
with the port.
Piece of a script (duh):
host = ""
port = 51423 #random for this example
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host, port))
Good Luck :D
More information about the Python-list
mailing list