have to set expectedBytes to 0 on the first packet