title: Detect client is connected to which port
body: <p>I have the following code and I want to detect in which port client is connected to factory. How can I achieve that?</p>
  
  <pre><code>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()
  </code></pre>