Article View: borland.public.cppbuilder.internet.socket
Article #5298Re: ESocketError
From: Remy Lebeau [TeamB]
Date: Sun, 19 Sep 2004 19:31
Date: Sun, 19 Sep 2004 19:31
24 lines
1932 bytes
1932 bytes
Hans Galema <dontusethis@dontusethis.nl> wrote: > Well what I think is what happens. Here an exception > is trown when the Host does not exist: <snip> > If the host exists but the server is not running then > indeed this exception will not throw and you have to > look at other events. In non-blocking mode, TClientSocket uses window messages internally for most of its operations. In the case of connecting to a server, the operation happens in several steps, each one of which can throw an exception long after your exception handling code has been passed by since the exception would be thrown in the context of a message handler later on. That is why you need to use the OnError event to catch errors that are not directly catchable. If you need the errors to be directly catchable, then you should consider switch your code to use blocking mode instead. Gambit
Technical Details
Message-ID:
<414dde96@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<414b8772$1@newsgroups.borland.com> <414bf1dc$1@newsgroups.borland.com> <414cb05a$1@newsgroups.borland.com> <414d4c10@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2a74cb97a91b535d X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau [TeamB]" <gambit47_no_spam@yahoo_no_spam.com> Sender: "Remy Lebeau [TeamB]" <gambit47_no_spam@yahoo_no_spam.com> Reply-To: "Remy Lebeau [TeamB]" <gambit47_no_spam@yahoo_no_spam.com> Subject: Re: ESocketError Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 206.107.212.103 References: <414b8772$1@newsgroups.borland.com> <414bf1dc$1@newsgroups.borland.com> <414cb05a$1@newsgroups.borland.com> <414d4c10@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <414dde96@newsgroups.borland.com> Date: 19 Sep 2004 12:31:34 -0700 X-Trace: newsgroups.borland.com 1095622294 207.105.83.66 (19 Sep 2004 12:31:34 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail