Re: [twsocket] WSocket DNSLookup.

2006-01-05 Thread Wilfried Mestdagh
Hello Ja,

 Program check list of domains with several components at once...
 putting something in woudldnt do the job.

Yes it does (not tested):

procedure TForm1.LookupBtnClick(Sender: TObject);
var
  Sock: TWSocket;
  n: integer;
bgein
  n := 0;
  while n  DomainList.Count do begin
Sock := TWSocket.Create(nil);
Sock.OnDnsLookupDone := SockDnsLookupDone;
Sock.Addr := DomainList[n];
Sock.DnsLookup(Sock.Addr);
Inc(n);
  end;
end;

procedure SockDnsLookupDone(Sender: TObject; Error: Word);
var
  Sock: TWSocket;
begin
  Sock := TWSocket(Sender);
  if ErrCode = 0 then
Memo1.Lines.AddStrings(Sock.DnsResultList + ' ' + Sock.Addr)
  else
Memo1.Lines.Add('Error ' + Sock.Addr + ' ' + WSocketErrorDesc(ErrCode))
  Sock.Release;
end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] ICS-beta V5 and V6 have been updated

2006-01-05 Thread Francois PIETTE
They now include changes to FtpCli by Angus Robertson (ModeZ and faster 
streams).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be