[Twisted-Python] How could I distinguish each TCP connection?

Eric Hsu nkeric at gmail.com
Tue Jun 21 03:33:20 EDT 2005

Thank you very much!
You've been a GREAT help :D

2005/6/21, Christopher Armstrong <radeex at gmail.com>:
> I suggest, instead of using the stock "Factory", making a subclass of
> it with buildProtocol implemented like so:
> def buildProtocol(self, addr):
> p = Factory.buildProtocol(self, addr)
> self.connections.append(p)
> return p
> Or similar (you'll have to define the 'connections' list yourself in
> __init__). In the protocol's connectionLost, you could then remove the
> protocol from that list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20050621/95ab402e/attachment.htm 

More information about the Twisted-Python mailing list