private void processData() throws IOException, InterruptedException
	{        
		//now always receive bytes and take action
		while(true)
		{
			Message msg = getNextMessage();
			//now interpret the message and take action

			int payloadLength = msg.getMsgLength() - 1;  //removing  the size of message type
			// System.out.println("msg.getMsgTypeValue()" + msg.getMsgTypeValue());
			switch(msg.getMsgTypeValue())
			{
			case 0:
				// System.out.println("choke message received");
				processChokeMessage();
				break;
			case 1:
				// System.out.println("unchoke message received");
				processUnchokeMessage();
				break;
			case 2:
				processInterestedMessage();
				break;
			case 3:
				processNotInterestedMessage();
				break;
			case 4:
				processHaveMessage(payloadLength);
				break;
			case 5:
				processBitfieldMessage(payloadLength);
				break;
			case 6:
				//System.out.println("message read now take action");
				processRequestMessage();
				break;
			case 7:
				processPieceMessage(payloadLength);
				break;
			default:
				System.out.println("Undef error!!");
			}
		}
	}