'Initialization method.
Note that we can\'t call reactor methods directly here because
it\'s not thread-safe, so we schedule the reactor/connection
stuff to be run from the event loop thread when it gets the
chance.'

def __init__(self, *args, **kwargs):

    Connection.__init__(self, *args, **kwargs)
    self.is_closed = True
    self.connector = None
    reactor.callFromThread(self.add_connection)
    self._loop.maybe_start()
