support length based message framing