 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Krzysztof Kozłowski Guest
|
Posted: Thu Aug 17, 2006 1:13 am Post subject: TIdTcpClient Connect Timeout |
|
|
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
|
Posted: Thu Aug 17, 2006 1:36 am Post subject: Re: TIdTcpClient Connect Timeout |
|
|
"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
|
Posted: Thu Aug 17, 2006 8:11 am Post subject: Re: TIdTcpClient Connect Timeout |
|
|
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 |
|
 |
|
|
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
|
|