🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3582

Re: How to reconnect a client ?

#3582
From: Hans Galema
Date: Tue, 28 Jun 2005 15:40
21 lines
1842 bytes
Denis wrote:

> Hummm... so I have to try to reconnect outside all the event handlers ?

Yes. I think so.

> It's damage because the socket is know inside the event handler.

The Socket is not important in this case. ClientSocket1 is importantant.

> So if I understand correctly I have to maintain a list of all my clients and
> build a loop to check connection every 'n' seconds in a timer function ?
> that right ?

You said that there was only one TCientSocket. And if the Socket of
TClientSocket1 looses connection then you do not have to have a list
because TClientSocket can only be connected to one server. So why do
you speak of a list ? As there is only one TClientSocket you can simply
call ClientSocket1->Open() in the TTimer eventhandler.

Hans.
Technical Details
Message-ID: <42c1706b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42c15771@newsgroups.borland.com> <42c15d78@newsgroups.borland.com> <42c16e39$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,274cba0e00c4db70
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 28 Jun 2005 17:40:57 +0200
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: How to reconnect a client ?
References: <42c15771@newsgroups.borland.com> <42c15d78@newsgroups.borland.com> <42c16e39$1@newsgroups.borland.com>
In-Reply-To: <42c16e39$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <42c1706b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119973483 129.125.201.248 (28 Jun 2005 08:44:43 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail