protected void sendBye(int whatpack)
    {
        Packet pack = new Packet();
        String[] packandhead = new String[2];
        switch (whatpack)
        {
            case 1:
                pack.addHeader((byte) 0x0A, (byte) 0x2F);
                pack.addInt(1, 2, false);
                packandhead[0] = pack.getHeader();
                packandhead[1] = pack.getPacket();
                this.socketOut.write(packandhead[0]);
                this.socketOut.flush();
                this.socketOut.write(packandhead[1]);
                this.socketOut.flush();
                break;

            case 2:
                pack.addHeader((byte) 0xE3, (byte) 0x2E);
                pack.addInt(1, 2, false);
                packandhead[0] = pack.getHeader();
                packandhead[1] = pack.getPacket();
                this.socketOut.write(packandhead[0]);
                this.socketOut.flush();
                this.socketOut.write(packandhead[1]);
                this.socketOut.flush();
                break;
        }
    }