I just wanted to add to number 2. In addition to possibly getting a partial packet, it’s also possible to get more than one packet in the same read - either multiple whole packets or 1 or more whole plus a partial. Packet terminators, and careful parsing of the data you get are almost required; fixed packet sizes may be another option.