I am trying to write a simple program using the Twisted framework, and I am struggling with resolution (or even with the image, how to write it). I could not find the relevant documentation for:
The main reactor uses two factories, one user that listens for TCP connections on this port (say, 8000) and the second, to enter this IRC server and channel. When receiving data (simple, single line text) in a factory, listening on 8000, I need to transfer this data to the second factory so that it can be processed accordingly - either send a message with this text to the channel, or a personal message to someone, it is not very important now. I canβt find a way to get data from the first factory and send it to another, for processing (maybe like a normal accepted connection for the second IRC factory?).
If this can be somehow resolved, then I would like to add one or several other plants (for example, Jabber) to send the received data to port 8000 to all of them at once, to transfer it accordingly to the protocols (IRC to channel, Jabber to contact and etc.).
Is there anyone who has encountered a similar problem and is willing to give me advice or even share some lines of code? Any help would be greatly appreciated!
Thanks in advance.
source
share