Add client.write([state, packetId])