python - Twisted producer to many clients with buffer -
I am using Twisted to distribute some information to many customers.
I write a code (code I have a data source implemented as a generator. Here's your main function So that it does not always look at how many customers run, how do I generate generator (or TelemetryProducer ) Can I run (0- 10)? Edit: Using Reactor InlineTrade (FN) seems to deliver the desired behavior, except that CTRL + C does not exit properly with the program. After CTRL + C, all connections are denied, but controls do not appear to open back. try. IConsumer with code>)> write method to write for all connected consumer customers overridden.
factory = TelemetryFactory () one2many = ConsumerToManyClientConsumers () #datalines Generator writes from one2many to telegame = TelemetryProducer (one2many, datalines) factory.setSource (One2many) reactor .listenTCP (1234, factory) reactor.run ()
Comments
Post a Comment