private void receiveDatafromServer()
	{   	
		while(true)
		{
			try {			
				DatagramPacket receivePacket = new DatagramPacket(rx_buff, rx_buff.length);
				clientReceiver.receive(receivePacket);					
				rx_buff = receivePacket.getData();
				//check checksum here

				dataReceived = true;			    	
				currentData = rx_buff[1];
				if(currentData == 3)
				{
					if(rx_buff[2] == 1)
					{
						ack = true;
					}
					else
						ack = false;
				}
				if(currentData==4||currentData==5)
				{			    		 
					char[] name = new char[rx_buff[2]];
					char[] number = new char[rx_buff[rx_buff[2]+3]];
					for(int ii =0; ii <name.length;ii++)
						name[ii] = (char) rx_buff[ii+3];
					for(int ii =0; ii <number.length;ii++)
						number[ii] = (char) rx_buff[ii+name.length+4];
					receivedEntry = new Entry(new String(name),new String(number));
				}		    
			} 
			catch (IOException e) 
			{			
				e.printStackTrace();
				System.err.println("Unable to receive from server");
			}
		}    	
	}