🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Ind9 -> Ind10 Conversion Question

#741
From: Omar Zelaya
Date: Thu, 27 Sep 2007 19:18
54 lines
2740 bytes
Thanks,

I allready tried that, but i have some problems with non-windows tcp 
clients(i.e. Mainframes) on Indy10(client gets a timeout), going to make 
more research to find out wich specifc ones doesnt work with Indy10. With 
Indy 9 works with no problems.

this is my for the Server Execute Method,
INDY 9:

ClientSession = (TClientSession*) AThread->Data;
  if (ClientSession != NULL)
   { if (AThread->Connection->Connected())
      { NewData = AThread->Connection->CurrentReadBuffer();
        if((NewData != "")
        ClientSession->NewDataReceived(NewData);
      }
   }

INDY 10
  ClientSession = (TClientSession*) AContext->Data;
  if (ClientSession != NULL)
   { if (AContext->Connection->Connected())
   { 
AContext->Connection->IOHandler->CheckForDataOnSource(AContext->Connection->IOHandler->ReadTimeout);
  NewData = AContext->Connection->IOHandler->InputBufferAsString();
  if (NewData != "")
     ClientSession->NewDataReceived(NewData);
   }
   }


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:46fa8f40$1@newsgroups.borland.com...
>
> "Omar Zelaya" <ozelaya2010@hotmail.com> wrote in message
> news:46f9bd49@newsgroups.borland.com...
>
>> I'm converting some code from Indy 9 to Indy 10, i use
>> CurrentReadBuffer() to wait and retrieve all data available
>> from the connection, now on Indy 10 which method or
>> methods can i use instead of CurrentReadBuffer() so i
>> can get the same functionality?
>
> Call the IOHandler's CheckForDataOnSource() and InputBufferAsString()
> methods, ie:
>
>    Connection.IOHandler.CheckForDataOnSource(Timeout);
>    Data := Connection.IOHandler.InputBufferAsString;
>
>
> Gambit
>
> 
Technical Details
Message-ID: <46fc0255$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46f9bd49@newsgroups.borland.com> <46fa8f40$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: "Omar Zelaya" <ozelaya2010@hotmail.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <46f9bd49@newsgroups.borland.com> <46fa8f40$1@newsgroups.borland.com>
Subject: Re: Ind9 -> Ind10 Conversion Question
Date: Thu, 27 Sep 2007 13:18:58 -0600
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 200.30.163.216
Message-ID: <46fc0255$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190920789 200.30.163.216 (27 Sep 2007 12:19:49 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail