implements rtmp chunk stream: parse basic header and message header