writePacket -> write