Public Sub SubmitJob(job As HttpJob) As Int
'** Modifica
If Main.ProxyHost <> Null AND Main.ProxyPort <> 0 Then
If Main.ProxyUsername <> Null AND Main.ProxyPassword <> Null Then
hc.SetProxy2(Main.ProxyHost, Main.ProxyPort, Main.ProxyScheme, Main.ProxyUsername, Main.ProxyPassword)
Else
hc.SetProxy(Main.ProxyHost, Main.ProxyPort, Main.ProxyScheme)
End If
End If
'** Fine Modifica
taskCounter = taskCounter + 1
TaskIdToJob.Put(taskCounter, job)
If job.Username <> "" AND job.Password <> "" Then
hc.ExecuteCredentials(job.GetRequest, taskCounter, job.Username, job.Password)
Else
hc.Execute(job.GetRequest, taskCounter)
End If
Return taskCounter
End Sub