Set Port from C++?

Good evening,

Is it possible to set the “-port=XXXX” in C++ instead of the arg line?
Id like to be able to read a file (which has the port) and use that port for the dedicated server.


Per CoreMisc.cpp

	// Allow the command line to override the default port
	if (FParse::Value(FCommandLine::Get(),TEXT("Port="),Port) == false)
		Port = GConfig->GetStr( TEXT("URL"), TEXT("Port"), GEngineIni );
	DefaultPort = FCString::Atoi( *Port );

looks like the port is provided in the Engine ini files, but can be overridden on the command line.