Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Indy Clients: wie rausfinden, ob timeout verbindung beendete (https://www.delphipraxis.net/21152-indy-clients-wie-rausfinden-ob-timeout-verbindung-beendete.html)

Meflin 28. Apr 2004 15:23


Indy Clients: wie rausfinden, ob timeout verbindung beendete
 
Hi,
wie kann ich rausfinden, ob der verbindungsversuch aufgrund eines timeouts beendet wurde?

*MFG*

SleepyMaster 28. Apr 2004 16:24

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
Ist zwar ein wirklich sehr unschöne Methode aber:

Delphi-Quellcode:
var T:longint;
begin
T:=GetTickcount;
try
IdTCPClient1.Connect(1000);
except end;
if GetTickcount-T = 1000 then
 showMessage('timeout error');
end;

Meflin 28. Apr 2004 17:25

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
stimmt ;-) wird da von den indys nix bereitgestellt???

Meflin 29. Apr 2004 14:16

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
weis das keiner? wär echt wichtig :-(

DataCool 29. Apr 2004 14:19

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
Hi,

das kannst Du im Except anhand der Exception feststellen.

Gruß Data

Meflin 29. Apr 2004 14:26

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
*räusper* :oops: wie komm ich an die hin?

DataCool 29. Apr 2004 15:59

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
Hi,

"EIdReadTimeout" heißt die Exception ! Eine Auflistung aller Exceptions findest Du in der Unit IdException !

Gruß Data

Meflin 29. Apr 2004 16:40

Re: Indy Clients: wie rausfinden, ob timeout verbindung been
 
thx


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:04 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz