out = new ObjectOutputStream(socket.getOutputStream());
out = new ObjectOutputStream(socket.getOutputStream()); out.flush(); } out.reset(); out.writeObject(packet);
    protected void send(Packet packet) {        debugLastFewCommandsSent.push(packet.getCommand());        packet.zipData();        try {            if (out == null) {            out = new ObjectOutputStream(socket.getOutputStream());            out.flush();        }        out.reset(); // write each packet fresh; a lot changes        out.writeObject(packet);        out.flush();        // System.out.println("c: packet #" + packet.getCommand() + " sent");        } catch (IOException ex) {            System.err.println("c: error sending command #" + packet.getCommand() + ": " + ex.getMessage()); //$NON-NLS-1$            System.err.println("    Last five commands that were sent (oldest first): " + debugLastFewCommandsSent.print());        }    }