private void receiveDatafromClient()
    {
    	while(true)
    	{	    	
			try 
			{				
				 DatagramPacket receivePacket = new DatagramPacket(rx_buff, rx_buff.length);
				 serverReceiver.receive(receivePacket);				 
		    	 rx_buff = receivePacket.getData();
		    	 IPAddressOfCurrentClient =receivePacket.getAddress();
		    	 PortofCurrentClient = receivePacket.getPort();
		    	 dataReceived = true;
		    	 currentData = rx_buff[1];		    	 
		    	 //check for checksum here
		    	 
		    	 if(currentData==1||currentData==2)
		    	 {		    		
		    		 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 client.");
			}
    	}
    }