binary protocol notes from the facebook hackathon
dustin at spy.net
Wed Jul 11 09:08:24 UTC 2007
On Jul 11, 2007, at 1:55, Trond Norbye wrote:
> I would also prefer a total length field. This would let me easily
> determine if I have the complete packet or not without searching
> through the packet and look for the various length fields...
You do have that. You must have 12 bytes for any packet. The last
four bytes of that tells you the number of bytes remaining.
I use that in my test server now to detect when I've accumulated
enough data to process a complete response.
More information about the memcached