🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to reconnect a client ?

#3583
From: Denis
Date: Tue, 28 Jun 2005 16:14
41 lines
2269 bytes

> > 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.
>

Sorry Hans, I was talking about one TClientSocket per process only to made
the thinks simple.
In the reality all process are server for all other process.

The configuration is dynamic, but if I launch 3 process called A, B and C,
the result of the connections are:


A ( server ) connect to B (client )
A ( server ) connect to C(client )

B( server ) connect to A(client )
B( server ) connect to C(client )

C( server ) connect to A(client )
C( server ) connect to B (client )


In this example A, B, and C have 1 TServerSocket and 3 TClientSocket.


So last question, how can I test if the connection is broken in the
TClientSocket object ?
Can I check the property Active ?


> Hans.
Technical Details
Message-ID: <42c17750$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42c15771@newsgroups.borland.com> <42c15d78@newsgroups.borland.com> <42c16e39$1@newsgroups.borland.com> <42c1706b@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
Reply-To: "Denis" <d.martinez@lac-sofreltc.fr>
From: "Denis" <d.martinez@lac-sofreltc.fr>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <42c15771@newsgroups.borland.com> <42c15d78@newsgroups.borland.com> <42c16e39$1@newsgroups.borland.com> <42c1706b@newsgroups.borland.com>
Subject: Re: How to reconnect a client ?
Date: Tue, 28 Jun 2005 18:14:05 +0200
Lines: 43
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: 81.80.234.43
Message-ID: <42c17750$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119975248 81.80.234.43 (28 Jun 2005 09:14:08 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail