public void clientClose() {
		timer.interrupt();
		int ack = 0;
		while (connectStatus == 2) {
			clientSendData(null, (short)1, (char)4, 5); //FIN
			
			Datagram datagram = receiveData();
			timer.interrupt();
			timer = null;
			if (datagram == null) {
				continue;
			}
			
			
			TTP ttp = (TTP)datagram.getData();
			ack = ttp.getACK();
			
			if (ttp.getCategory() == (char)5 && ack == expectSYN) {				
				connectStatus = 3;
				ACK = ttp.getSYN() + ttp.getLength();
				SYN = expectSYN;
			}
		}
		
		while (true) {
			System.out.println("Sending FIN + ACK");
			System.out.println("Wait 20 seconds to close client...");
			
			ClientCloseTimer closeTimer = new ClientCloseTimer(20);
			clientSendData(null, (short)1, (char)6, 1); //SYN + ACK
			closeTimer.start();
			receiveData();
			timer.interrupt();			
		}
	}