Wrote a custom Protocol encoder for Apache MINA that reads exactly the number of bytes we expect and then deserializes via the v0 or v1 formats. This should allow embedded newlines in messages, among other things.