BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIdTcpClient Connect Timeout

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Krzysztof Kozłowski
Guest





PostPosted: Thu Aug 17, 2006 1:13 am    Post subject: TIdTcpClient Connect Timeout Reply with quote



Hi all,

I have recently switched from Indy 9 to 10. I used the timeout value
when I called the Connect() method in TIdTcpClient to make the
application not waiting too long if the server is not available. Now I
see, that in Indy 10 one cannot call the Connect() method with the
timeout parameter. I tried to set the ConnectTimeout value for the
client, but it seems that it's not working anymore. Could anyone please
help me, telling how to apply the timeout to TIdTcpClient.Connect()?

Regards,

Krzysztof Kozlowski
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Aug 17, 2006 1:36 am    Post subject: Re: TIdTcpClient Connect Timeout Reply with quote



"Krzysztof Kozłowski" <kozlorf (AT) poczta (DOT) onet.pl> wrote in message
news:44e37bbf$1 (AT) newsgroups (DOT) borland.com...

Quote:
Now I see, that in Indy 10 one cannot call the Connect() method
with the timeout parameter.

That is because it was moved to a property.

Quote:
I tried to set the ConnectTimeout value for the client, but it
seems that it's not working anymore.

Yes, it does. Connect timeouts work the same in Indy 10 as they did in Indy
9. The desired value is simply coming from a property now instead of from a
method parameter.

Quote:
Could anyone please help me, telling how to apply the timeout
to TIdTcpClient.Connect()?

You already know the answer to that - use the ConnectTimeout property.


Gambit
Back to top
Krzysztof Kozłowski
Guest





PostPosted: Thu Aug 17, 2006 8:11 am    Post subject: Re: TIdTcpClient Connect Timeout Reply with quote



Remy Lebeau (TeamB) wrote:
Quote:
"Krzysztof Kozłowski" <kozlorf (AT) poczta (DOT) onet.pl> wrote in message
news:44e37bbf$1 (AT) newsgroups (DOT) borland.com...

Now I see, that in Indy 10 one cannot call the Connect() method
with the timeout parameter.

That is because it was moved to a property.

I tried to set the ConnectTimeout value for the client, but it
seems that it's not working anymore.

Yes, it does. Connect timeouts work the same in Indy 10 as they did in Indy
9. The desired value is simply coming from a property now instead of from a
method parameter.

Could anyone please help me, telling how to apply the timeout
to TIdTcpClient.Connect()?

You already know the answer to that - use the ConnectTimeout property.


Gambit



Indeed it works. I thought, that the Connect() function just exits after
the timeout elapsed, but it seems it gives a timeout exception instead.

Big thanks,

Krzysztof Kozlowski
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.