Article View: borland.public.cppbuilder.internet.socket
Article #3188Re: TClientSocket and error events
From: Stormy
Date: Tue, 25 Oct 2005 19:08
Date: Tue, 25 Oct 2005 19:08
21 lines
2149 bytes
2149 bytes
Remy Lebeau (TeamB) wrote: > "Stormy" <s70rmy@hotmail.com> wrote in message > news:434fa1c3@newsgroups.borland.com... > >> Unfortunately, this is the case where exception is thrown >> before OnError event occurs... > > That bug was already fixed in BCB6. The lookup error triggers the > OnError event before throwing the exception. Tried recompiling my code with BCB6 today and got same result. Well, not entirely... Exception does not get thrown before OnError event any more, (and you can supress it by resetting error code to 0 in OnError event) but if you try to connect TClientSocket to server that doesn't exist, OnError event gets triggered with error code #11001. OK. Now if you try to connect same socket to server that does exist and is running, OnError event gets triggered again (for some reason unknown to me) with error #10049. If you try connecting it to same server again, OnRead event gets triggered (finally!) and everything seems fine. I dont understand why #11001 and #10049 have to come in pairs.?. VCL, winsock, bug, feature, standard??? *Confused*.
Technical Details
Message-ID:
<435e81f9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<434eecdf@newsgroups.borland.com> <434f0102$1@newsgroups.borland.com> <434f5fe5@newsgroups.borland.com> <434f6246$1@newsgroups.borland.com> <434fa1c3@newsgroups.borland.com> <434ff0ad$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bc23240211b4e678 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Stormy" <s70rmy@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <434eecdf@newsgroups.borland.com> <434f0102$1@newsgroups.borland.com> <434f5fe5@newsgroups.borland.com> <434f6246$1@newsgroups.borland.com> <434fa1c3@newsgroups.borland.com> <434ff0ad$2@newsgroups.borland.com> Subject: Re: TClientSocket and error events Date: Tue, 25 Oct 2005 21:08:30 +0200 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 193.198.138.114 Message-ID: <435e81f9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130267129 193.198.138.114 (25 Oct 2005 12:05:29 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail