Thema: Delphi Idhttp array Probelm

Einzelnen Beitrag anzeigen

gandime
(Gast)

n/a Beiträge
 
#1

Idhttp array Probelm

  Alt 2. Apr 2008, 20:15
Hi,
ich möchte ein Idhttp arrayerstellen aber das will mal wieder nicht so richtig was mache ich flache?
Delphi-Quellcode:
var
  ht: array [1..100] of TIdHTTP;
begin
  for I := 1 to 100 do
  begin
    ht_status[i]:='n';
    ht[i]:=Tidhttp.Create(nil);
    ht[i].HandleRedirects:=True;
    ht[i].RedirectMaximum:=15;
    ht[i].Request.UserAgent:='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';
    ht[i].ReadTimeout:=60000;
    ht[i].IOHandler:=IdSSLIOHandlerSocketOpenSSL1;
    ht[1].Post('https://abc.de',sl);// fehler bei i=2
  end;
Fehler:
Delphi-Quellcode:
Erste Gelegenheit für Exception bei $755D3843. Exception-Klasse EIdNotASocket mit Meldung 'Socket Error # 10038
Socket operation on non-socket.
'. Prozess Project1.exe (2824)
mfg
gandime
  Mit Zitat antworten Zitat