🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Ind9 -> Ind10 Conversion Question

#742
From: Remy Lebeau (TeamB)
Date: Thu, 27 Sep 2007 19:50
33 lines
2211 bytes
"Omar Zelaya" <ozelaya2010@hotmail.com> wrote in message
news:46fc0255$1@newsgroups.borland.com...

> I allready tried that, but i have some problems with non-windows
> tcp clients(i.e. Mainframes) on Indy10(client gets a timeout)

Then the client is likely not sending any data to begin with.  There is
nothing in the code I have given you that can raise an timeout exception.

> going to make more research to find out wich specifc ones doesnt
> work with Indy10.

TCP is TCP regardless of whether you use Indy 9 or 10.  If the data being
sent is the same, then Indy 10 should be working fine for you.

> With Indy 9 works with no problems.

You shouldn't really be checking for Connected() at all, in either 9 or 10.
Let Indy raise an exception when you try to read from a socket that has been
closed.  That will notify the server to shut down the thread for that
connection.

Try this instead:

    ClientSession = (TClientSession*) AContext->Data;
    AContext->Connection->IOHandler->CheckForDataOnSource(IdTimeoutDefault);
    NewData = AContext->Connection->IOHandler->InputBufferAsString();
    if( (NewData != "") && (ClientSession != NULL) )
        ClientSession->NewDataReceived(NewData);


Gambit
Technical Details
Message-ID: <46fc09d2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46f9bd49@newsgroups.borland.com> <46fa8f40$1@newsgroups.borland.com> <46fc0255$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3afead73ec6bed04
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <46f9bd49@newsgroups.borland.com> <46fa8f40$1@newsgroups.borland.com> <46fc0255$1@newsgroups.borland.com>
Subject: Re: Ind9 -> Ind10 Conversion Question
Date: Thu, 27 Sep 2007 12:50:42 -0700
Lines: 35
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: 75.83.29.61
Message-ID: <46fc09d2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190922706 75.83.29.61 (27 Sep 2007 12:51:46 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail