public void clientReceiveData() {
		if (isConnected) {
			Datagram datagram = receiveData();
			TTP ttp = (TTP)datagram.getData();
			int ack = ttp.getACK();
			
			timer.interrupt();
			System.out.println("Timer alive: " + timer.isAlive());
			
			if (ttp.getCategory() == (char)3 && ack == expectSYN) {

				ACK = ttp.getSYN() + ttp.getLength();
				SYN = expectSYN;
				
				clientSendData(null, (short)0, (char)3); //SYN + ACK
				
				System.out.println("connectioin established");
			} else {
				clientSendData(data, (short)data.length());
			}
		} else {
			System.out.println("Please establish the connection first");
		}
	}