🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Indy TCP "Wait for Reply"

#3091
From: Darlington ADIBE
Date: Thu, 17 Nov 2005 07:27
26 lines
2110 bytes
Hi All,

Am doing an App using the indy TCP server/Client componnet and i need an
adivce on how best to handle the situation am about the describle below.

the tcp client is in a COM object with the following methods Authenticat,
Send, etc....,
when the host  client app (exe using my COM API) calls the authenticate
method, my com obj tries to connect to a TCP Server on a remote machine, if
connected it send the uid and pwd parameter pass through authenticate to the
server msg format "#AUTHEN#xxxx#xxxx# where AUTHEN = do Authentication,
first xxxx = Username, second xxxx = password, the server check the
username/password pairs in a database, if correct it sends back #AUTHEN#OK#
if not it sends #AUTHEN#ERR#xxxxxxx# where xxxxx = reason of then Error.

The situation above i have don so far, the issue is in the client end, when
the exe call the com api Authenticate(uid, pwd), I don't want the method
(authenticate) to return untill the server send back #AUTHEN#OK# or
#AUTHEN#ERR#xxxxxx# or a RTimeout property of the COM obj is reached
RTimeout is the Rececive Time Out propety of the con obj that indicate how
long to wait before expected receive times out.

Any profession advice on how to implement this "wait for reply" issue


Darl.
Technical Details
Message-ID: <437c328b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,187f889f070be6a7,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Darlington ADIBE" <bcb@triative.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Indy TCP "Wait for Reply"
Date: Thu, 17 Nov 2005 08:27:32 +0100
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 83.229.68.10
Message-ID: <437c328b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132212875 83.229.68.10 (16 Nov 2005 23:34:35 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail