in SimpleDUTRemote/Functions.cs [256:291]
public int StartJobWithProgress(string callbackAddress, long callbackPort, long progressPort,
string programName, string args = null)
{
IPAddress callbackIp;
if (String.IsNullOrWhiteSpace(callbackAddress))
{
if (SimpleRpcServer.currentClient == null || SimpleRpcServer.currentClient.Value == null)
{
throw new InvalidOperationException("No callback IP provided, and unable to get current connection data.");
}
callbackIp = SimpleRpcServer.currentClient.Value.Address;
}
else
{
callbackIp = IPAddress.Parse(callbackAddress);
}
JobCallbackInfo info = new JobCallbackInfo()
{
Address = callbackIp,
Port = (int) callbackPort,
ProgressPort = (int) progressPort
};
if (callbackPort == 0 || progressPort == 0)
{
throw new ArgumentException("Both callbackPort and progressPort must be non-zero");
}
Process p = SetupProcess(programName, args, true);
var newJob = Job.CreateJob(p, info);
jobs[newJob.jobId] = newJob;
return newJob.jobId;
}