[Twisted-Python] Sending a stream via Protocol?

Darren Govoni darren at ontrenet.com
Sat Feb 6 11:42:42 EST 2010


Hi,
  I have a simple protocol listening on a port. I send it a text message
(a filename)
and the protocol tries to stream back the bytes of the file. Mostly,
this works
but in some cases, the receiving side receives less bytes than is
written by:

self.transport.write(bytes)

I read the API which says it can receive less than expected bytes or
messages. Why?

So how can I reliably send a sequences of bytes via "dataReceived" in my
protocol?

Thanks for any help!
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100206/f3e25368/attachment.htm 


More information about the Twisted-Python mailing list