🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

indy tcp server

#4348
From: Jonathan Benedicto
Date: Mon, 14 Feb 2005 19:55
22 lines
1553 bytes
I'm trying to send variable length data "packets" to a Indy IdTCPServer.

How can I receive all the data that is currently in the internal Indy read 
buffer without having to wait for a fixed amount of data to be in it ?

Eg. If I read data like this :

char* buffer = new char[200];
while(!AThread->Terminated){
    AThread->Connection->ReadBuffer(buffer, 200);
    ...
};
...

Then the app can only work with 200 bytes chucks of data. Even if the 
sending app sent a 100 byte chunk and then a 300 byte chunk.

Sorry if I haven't explained easily.

-- 
Jonathan
 
Technical Details
Message-ID: <42110245$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed1.ip.tiscali.net!tiscali!newsfeed2.ip.tiscali.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3835546c79abd997,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: indy tcp server
Date: Mon, 14 Feb 2005 14:55:51 -0500
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.158.108.120
Message-ID: <42110245$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108410949 69.158.108.120 (14 Feb 2005 11:55:49 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed1.ip.tiscali.net!tiscali!newsfeed2.ip.tiscali.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail