[mnet-devel] Re: [mnet-cvs]kb-scaled timeouts

Zooko zooko at zooko.com
Thu May 1 14:36:28 BST 2003


> > Or how about just "byte  = len(firstmsgbody)" ?
> 
> whats the way to make len return the total number of bytes all
> the keys, values and things in the msgbody data structure use up?
> (note: mencode happens _after_ we need to specify the timeout)

Oh -- firstmsgbody isn't mencoded yet?  Well, the way is 
"bytes = len(mencode(firstmsgbody))".

It would of course be an optimization to send the resulting string instead of 
mencoding the structure again.

But even if you mencode twice, that is better than using pickle.

--Z



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list