'This function is called when outgoing data should be queued
for sending.
Note that we can\'t call transport.write() directly because
it is not thread-safe, so we schedule it to run from within
the event loop when it gets the chance.'

def push(self, data):

    reactor.callFromThread(self.connector.transport.write, data)
