How do I communicate between factories/connection objects in Twisted?
<p>I have a Twisted script (in progress) with a client and a server. I am trying to figure out a way to make it so that when dataReceived(self, data) is called in the server factory, it then triggers the client to send that same data over its already established TLS connection. </p>

<p>The problem is, all of the examples I can find that involve the server sending its data over a connection, involve that server forming a new connection each time within itself. Whereas, I want to send my data over an already established persistent connection which is outside of the server-factory. In fact, it must be accessible by multiple different factories each listening on a unique port. In other words, I need all these different servers to be able to forward their received data to the client/TLS-send.</p>

<p>In theory it seems like it would be extremely straightforward to do, but due to the way twisted works, I can't for the life of me figure out how to communicate between unique objects/factories. </p>

<p>I figure I could easily accomplish this if I established the TLS connection outside of Twisted, but then I would be forgoing many of the useful features Twisted offers.</p>