[Twisted-Python] processProtocol woes and a plea for aid

Gary Coulbourne GCoulbourne at Immunicon.com
Wed Jun 23 13:34:45 EDT 2004


Howdy!

I'm using processProtocol to talk to a program written by a coworker.  It handles things fine, but it is asynchronous in that when I send a response to it, it may send several responses back, or it may just randomly send back a response.  If I were handling this output a line at a time, it would be fine, but processProtocol seems to put all of the responses together... each response is followed by a \n.  I naively assumed that each time a line was complete, Twisted would call my outRecieved.  It seems, though, that dozens of respopnses can build up in the buffer before it was called.

I'm certain I am missing out on something basic.  Is there any way to set processProtocol to look at the \n as a signal to call outRecieved rather than to call it at some arbitrary time?  I didn't see anything quickly obvious in the source, so I thought I would ask for advice.

Thanks in advance for any help or suggestions!

Peace,
Gary

This e-mail message is intended only for the personal use of the recipient(s) named above. This message should be considered a confidential communication, and as such is not subject to disclosure to anyone who is not an intended recipient.  If you are not an intended recipient, you may not legally review, copy or distribute this message. If you have received this communication in error, please notify the sender(s) immediately by e-mail and delete the original message from your computer system.







More information about the Twisted-Python mailing list