Article View: borland.public.cppbuilder.internet.socket
Article #1564Re: TCPClient Connect Question
From: Remy Lebeau (TeamB)
Date: Sun, 31 Dec 2006 21:29
Date: Sun, 31 Dec 2006 21:29
22 lines
1618 bytes
1618 bytes
"Colin B Maharaj" <noreply@myhost.com> wrote in message news:45979aa9$1@newsgroups.borland.com... > 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. That is normal for TCP. It can take awhile for a host to be detected as invalid if it canot be reached right away. > 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. You can disconnect the socket from within a different thread (such as the thread that wants to terminate the worker thread), which will cause Connect() to fail immediately within the worker thread that called it. Gambit
Technical Details
Message-ID:
<45982bdd$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45979aa9$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,8f020b77ded58f58 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45979aa9$1@newsgroups.borland.com> Subject: Re: TCPClient Connect Question Date: Sun, 31 Dec 2006 13:29:04 -0800 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45982bdd$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1167600605 75.83.34.171 (31 Dec 2006 13:30:05 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail