public char nextRequest(int timeout) throws Exception
	{
		String requestPath = request(timeout);
		if (requestPath == null)
			return 'X';
		if (isFileRequest(requestPath)) {
			replyFile(requestPath);
			return 'I';
		}
		if (requestPath.equals("play"))
			return 'P';
		if (requestPath.equals("step"))
			return 'N';
		if (requestPath.equals("stop"))
			return 'S';
		if (requestPath.equals(""))
			return 'B';
		throw new Exception("Invalid request");
	}