public search(String file_name)
	{
		this.file_name = file_name;
		try{
			
			while(hopcount<16 && !computer.found)
			{
				//Send search request to all neighbors to start the process of searching for a file.
				String message="SEARCH_REQ"+" "+computer.id+" "+computer.myhost
						+" "+computer.port+" "+file_name+" "+hopcount+" "+computer.id;
				computer.broadcast(message);
				Thread.sleep(ttl*hopcount);
				hopcount=hopcount*2;
			}
			
			if(computer.found)
			{
				@SuppressWarnings("resource")
				Scanner inp =new Scanner(System.in);
				System.out.println("Hop count: "+hopcount);
				System.out.println("Time elapsed in ms: "+(System.currentTimeMillis()-time));
				System.out.println("Where do you want to download from?");
				for(int i=0;i<computer.result_list.size();i++)
				{
					System.out.println(i+") "+computer.result_list.get(i));
				}
				int choice = Integer.parseInt(inp.nextLine());
				if(choice<0||choice>computer.result_list.size())
					System.out.println("Invalid option. File was not downloaded.");
				else
				{
					Random rand = new Random();
					port = 4000+rand.nextInt(10);
					String msg = "SEND_FILE "+file_name+" "+computer.myhost+" "+port;
					String[] node = computer.result_list.get(choice).split(" ");
					new client(node[0],node[1],msg);
					System.out.println("Starting file download...");
					download();
					System.out.println("Download complete.");
				}
			}
			else
				System.out.println("Requested file does not exist.");
			
			computer.found=false;
			computer.result_list.clear();
			computer.writeFileNames();
			computer.readFileNames();
		
		}catch(Exception e){
			System.out.println("Exception: Possible reasons \n 1.Target machine may have gone offline. \n" +
					" 2.Text file you are downloading might be empty. \n 3.Thread might have been interrupted from its sleep.");
			computer.found=false;
			computer.result_list.clear();
			computer.writeFileNames();
			computer.readFileNames();
		}
	}