[Twisted-Python] Clossing one TCP connection

Carolina Ardohain carolinaardohain at gmail.com
Wed Apr 27 19:10:29 EDT 2005

I launch several connections using an object like this

class MyConnection()
  def __init__(host, port, factory):
    self.factory = factory
    self.connector = reactor.connectTCP(host, port, factory)

I create several connections

m1 = MyConnection('host1', 8000, MyFactory())
m2 = MyConnection('host2', 8000, MyFactory())


Now I want to create a method onClose that close the connection,
something like reactor.stop() but that dont close the whole

More information about the Twisted-Python mailing list