public PeerHost(){
		this.bitfield = new boolean[0];

		for(int i = 1; i < 10; i++){
			port = 6880 + i;
			try {
				socket = new ServerSocket(port);
				System.out.println("Listen port is: " + port);
				break;
			} catch (NumberFormatException e) {
				/* Nope */
			} catch (IOException e) {
				System.out.println("port " + port + " is in use");
			}
		}
		

		char[] chars = "0123456789ABCDEF".toCharArray();
		StringBuilder sb = new StringBuilder();
		Random random = new Random();
		for (int i = 0; i < 20; i++) {
		    char c = chars[random.nextInt(chars.length)];
		    sb.append(c);
		}
		peer_id = sb.toString();
		
		start();
	}