[Twisted-Python] Large Transfers

Bernhard Herzog bh at intevation.de
Sat May 10 14:02:41 EDT 2003

"Uwe C. Schroeder" <uwe at oss4u.com> writes:

> On Saturday 10 May 2003 09:01 am, Bernhard Herzog wrote:
> > A better solution for limiting the size seems to be a limit on the
> > number of bytes accepted by the receiver for a single PB call.
> as far as I understand it the 640k ARE the limit for one single PB call.

640k /Bytes/ is only a limit for a single string. There's also a limit
of 640 * 1024 items in lists and tuples. 

You could send large strings by simply slicing them into chunks of e.g.
8K each and sending them as a list. At the other end you simply "".join
them. With a limit of 640 * 1024 such strings in a list you should be
able to send any string that fits into memory on most systems.

> > Anyway, limits on the data size should be configurable IMO so that
> > programmers can set the limit based on the needs of their applications.
> This might be correct, however if you design a certain protocol you usually 
> imply certain restrictions. From that point of view I must say Glyph is 
> having a point here.

He might well have a point, but I don't understand it :(. 
The limit can easily be circumvented by malicious users and for the
users it only seems to put it arbitrary restrictions.


Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/

More information about the Twisted-Python mailing list