Message29405
Providing 0 as a port in __init__ of
SocketServer.TCPServer leads to different values for
port in server_address and socket.getsockname().
Example:
import SocketServer
s = SocketServer.TCPServer(("0.0.0.0", 0), Handler)
s.server_address
-> ('0.0.0.0', 0)
s.socket.getsockname()
-> ('0.0.0.0', 39129)
s.server_address should also contain 39129 as the
port number for the free port found.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:41:49 | admin | link | issue1531963 messages |
2007-08-23 14:41:49 | admin | create | |
|