[Twisted-Python] echo server using deferToThread
andrew-twisted at puzzling.org
Sun Feb 6 22:29:33 EST 2005
On Sun, Feb 06, 2005 at 07:15:34PM -0800, snacktime wrote:
> I can't figure out why LineReceived never gets called in the client. Any ideas?
> class EchoClient(LineReceiver):
> class Echo(Protocol):
> def dataReceived(self, data):
> reactor.callLater(0, self.RunThread, data)
> def PrintData(self,data):
> print "Sent GoodBye"
You're not writing a whole line, so a line is never received :)
Use self.sendLine('GoodBye') instead.
More information about the Twisted-Python