[Twisted-Python] Streaming File Transfer Protocol?

Darren Govoni darren at ontrenet.com
Fri Feb 19 13:38:37 EST 2010

Hmmmm. I set self.MAX_LENGTH in my subclass
(self.MAX_LENGTH=73768960000) but still no callback happens to
strongReceived. Also, the connection is not lost.

Its like it doesn't notice it on the server, while the client writes
successfully. Still investigating.

On Fri, 2010-02-19 at 13:12 +0000, exarkun at twistedmatrix.com wrote:

> On 11:33 am, darren at ontrenet.com wrote:
> >Hi again,
> >   Ok, so now it seems the Int32StringReceiver does not receive
> >"stringReceived" events if the sent bytes
> >exceed a certain amount. If I send from the client, say 5000 bytes. It
> >receives it.
> >
> >But when i send 7376896 bytes at a time, the client indicates it wrote
> >the bytes, but there is not one
> >stringReceived callback on the server side of the protocol. No error or
> >exception. nothing.
> >Is this normal behavior?
> Yes.  You've hit the arbitrary additional limit on the maximum length of 
> a single string that Int32StringReceiver will accept.  When this limit 
> is exceeded, the connection is dropped.  If you really want to accept 
> 7MB strings from your peer, set the MAX_LENGTH attribute of your 
> Int32StringReceiver subclass (or instance) to large enough value.  You 
> can also get notification when this limit is exceeded by overriding the 
> lengthLimitExceeded method (the default implementation of which is what 
> drops the connection).
> Jean-Paul
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100219/c52f424f/attachment.htm 

More information about the Twisted-Python mailing list