1
我有以下代碼,我想檢測哪個端口客戶端連接到工廠。我怎樣才能做到這一點?檢測客戶端連接到哪個端口
from twisted.internet import reactor
conn = txredisapi.lazyRedisConnectionPool(reconnect = True)
factory = STSFactory(conn)
factory.clients = []
print "Server started"
reactor.listenTCP(11000,factory)
reactor.listenTCP(11001,factory)
reactor.listenTCP(11002,factory)
reactor.run()