synchronized private void replyConnectToMe(String user, String ip, int port) throws BotException, IOException { //Called in response to $ConnectToMe command from hub.
		if (!isConnected()) {
			throw new BotException(BotException.Error.NOT_CONNECTED_TO_HUB);
		}
		if (!user.equalsIgnoreCase(_botname)) {
			throw new BotException(BotException.Error.UNEXPECTED_RESPONSE);
		}

		Socket newsocket = new Socket();
		newsocket.connect(new InetSocketAddress(ip, port), 60000);
		logger.info("00>>Connected to remote Client:: " + ip + ":" + port);

		String buffer = "$MyNick " + _botname + "|$Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.698ABCABC|"; //user == remote_nick
		SendCommand(buffer, newsocket);

		final InputStream clientInput = newsocket.getInputStream();
		
		buffer = ReadCommand(clientInput); //Reading $MyNick remote_nick| OR $MaxedOut
		if (buffer.equals("$MaxedOut|")) {
			throw new BotException(BotException.Error.NO_FREE_SLOTS);
		}
		String remote_nick = parseRawCmd(buffer)[1];
		if (!um.userExist(remote_nick)) {
			throw new BotException(BotException.Error.USERNAME_NOT_FOUND);
		}

		User u = um.getUser(remote_nick);
		u.setUserIP(ip);

		buffer = ReadCommand(clientInput); //Reading $Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.698ABCABC|
		String lock = parseRawCmd(buffer)[1];
		String key = lock2key(lock);
		if (!lock.startsWith("EXTENDEDPROTOCOL")) {
			logger.error("Remote client doesn't support Exdtended protocol. Don't know how to continue now. Baling out.");
			throw new BotException(BotException.Error.PROTOCOL_UNSUPPORTED);
		}

		buffer = ReadCommand(clientInput); //Reading $Supports S|
		String remote_supports = parseCmdArgs(buffer);
		u.setSupports(remote_supports);

		buffer = ReadCommand(clientInput); //Reading $Direction D N|
		String params[] = parseRawCmd(buffer);
		String direction = params[1];
		int N = Integer.parseInt(params[2]);

		buffer = ReadCommand(clientInput); //Reading $Key ........A .....0.0. 0. 0. 0. 0. 0.|

		if (direction.equalsIgnoreCase("Upload")) {
			try {
				downloadManager.download(remote_nick, newsocket, N, key);
			} catch (BotException be) {
				socket.close();
			}
		} else
			uploadManager.upload(remote_nick, newsocket, N, key);
	}