update PacketWriter