python - Simple Twisted server won't write with Timer -
I am just learning python and twisted and I do not want to know why this simple server won? T work yourself Transportation. The written job does not work when the timer is called. I do not get any errors. Thank you so much for any help appreciated! Twisted.internet.protocol imported factory, twisted.internet import from the protocol imported reactor import timer class from prototype (protocol) threading: def say something (self): self.transport .writing ('hello ho \ r \ n') def connection created (Self): Timer (5, self, some). Start () Category The Factory (Factory): Protocol = Prototo Reactor. LISTIN TCP (8007, The Factory ()) Reactor .run ()
I Have understood yourself.
From:
Most of the code in twisted is not thread-safe. For example, data writing in a transport from a protocol is not thread-safe.
Thanks anyway people!
Comments
Post a Comment