Article View: borland.public.cppbuilder.internet.socket
Article #1562TCPClient Connect Question
From: Colin B Maharaj
Date: Sun, 31 Dec 2006 11:11
Date: Sun, 31 Dec 2006 11:11
29 lines
1884 bytes
1884 bytes
Hi all, firstly thanks again to all that has assisted me this year it has been good. And for those who are down and out I really wish you a great day today and that things get better and better in the following year (honestly)! Anyway I have a thread that is doing some Indy stuff. First it connects then does what it has to do until I terminate the thread. Thing is I am doing testing with an invalid I.P. address and want the connection to fail (no problem) also the Connect() command may take a few seconds (5 to 10) before it fails. But within say 1-2 seconds I may change my mind and want to close the thread, but this is in te middle of the Connect method. So the problem is how do I 'intercept' the Connect() method while it is trying hard to connect to an invalid address so that I can quickly exit my thread. e.g. force time out the Connect method. Thanks again!!! And have a great new year!! Colin B Maharaj Trinidad, W.I.
Technical Details
Message-ID:
<45979aa9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,8f020b77ded58f58,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sun, 31 Dec 2006 07:11:15 -0400 From: Colin B Maharaj <noreply@myhost.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: TCPClient Connect Question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 200.108.19.204 Message-ID: <45979aa9$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1167563433 200.108.19.204 (31 Dec 2006 03:10:33 -0800) Lines: 29 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail