add length-prefixed support to identify protocol