public static void main(String args[]) {
		ClientInfo ci = new ClientInfo();
		JFileChooser jfc = new JFileChooser();
		jfc.showOpenDialog(null);
		Torrent t = new Torrent(jfc.getSelectedFile(), ci);
		Torrent.initializeFile(t.fileName(), ((Long) t.fileLength()).intValue());

		Executor tPool = Executors.newFixedThreadPool(10);

		System.out.println("Peers:");
		System.out.println(t.getPeers());
		System.out.println("Pieces:");
		System.out.println(t.getPieces());

		while (!t.getPieces().isEmpty()) {
			tPool.execute(new DownloadThread(t.getPieces().poll(), t, t.getPeers().poll()));
		}

		/*
		 * InetSocketAddress address = new InetSocketAddress(host, port); SocketChannel channel = null; try { System.out.println("Attempting to connect to " + host); channel = SocketChannel.open(address); while (!channel.isConnected()) { Thread.sleep(10); }
		 * 
		 * System.out.println("Connected. Time to send handshake."); } catch (Exception e) { e.printStackTrace(); }
		 */
	}