Article View: borland.public.cppbuilder.internet.socket
Article #4358Re: (code) Re: Error on reconnection to server
From: Ben
Date: Tue, 15 Feb 2005 14:49
Date: Tue, 15 Feb 2005 14:49
27 lines
2546 bytes
2546 bytes
Dear Hans! I am using this part exactly the same way as the Borland chat sample. But this is not the problem, the whole communication works fine. The problem lies in the reconnection. The way I try to reconnect to the server in case the server went down and stays down for some time. When the server is up again I want to reconnect. This reconnection is not working well. As dummy server I'm using the server part from the chat program. The reconnection takes different times, or does not reconnect at all. And when reconnected, socket->active is true, there is no reconnection, i.e. the server is still listening. When there is e valid reconnection everything works fine. BTW, the message is always available, with or without valid data. Any way data is not changed when sent, inpointer != outpointer of buffer. The SocketSend function is executed when an acknowledge has been received. The acknowledge is a receivebuf. The system start by sending one set of data and waiting for an answer. When this takes too long or an error message is received, the original data is resend. This actually works fine, as long as there is connection with the server. I hope this gives you enough information to give a clou. Thanx anyway, Ben
Technical Details
Message-ID:
<42120c10@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4208d668$1@newsgroups.borland.com> <4208fa07$1@newsgroups.borland.com> <4209bc24$1@newsgroups.borland.com> <42105bd0$1@newsgroups.borland.com> <4210767f$1@newsgroups.borland.com> <4211e9a4$1@newsgroups.borland.com> <4211f823@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7304809fda7b8b4e X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 15 Feb 2005 15:49:51 +0100 From: Ben <TerNOra@etraSPAMde.nl> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: (code) Re: Error on reconnection to server References: <4208d668$1@newsgroups.borland.com> <4208fa07$1@newsgroups.borland.com> <4209bc24$1@newsgroups.borland.com> <42105bd0$1@newsgroups.borland.com> <4210767f$1@newsgroups.borland.com> <4211e9a4$1@newsgroups.borland.com> <4211f823@newsgroups.borland.com> In-Reply-To: <4211f823@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.126.94.138 Message-ID: <42120c10@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1108478992 80.126.94.138 (15 Feb 2005 06:49:52 -0800) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail