🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14751

Re: BCB TCP IP component

#14751
From: Hans Galema
Date: Fri, 01 Aug 2003 09:19
26 lines
1879 bytes
Chris wrote:

> I'm sending binary data.
> Each message's first bytes contain the size of the message. 

Very good. That will be the 4 bytes of an (unsigned) int ?

 > I only receive
> about 50k at once,

That's possible. That's a lot.

 > so my code in OnRead is called many times. It ends the
> recording and processes the message after all the data it was told it was
> getting has been received.
> 
> If it is one byte too long or short, it's fatal.

Indeed, I experienced that too.

> Is there a way for it to be too long, and is there a way it could be too
> short 

No. There is something wrong with your code then.

Hans.
Technical Details
Message-ID: <3f2a3040$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f29cebd$1@newsgroups.borland.com> <3f29d94d@newsgroups.borland.com> <3f29dd02$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9e6acf8dd63da257
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-01 02:32:16 PST
Date: Fri, 01 Aug 2003 11:19:03 +0200
From: Hans Galema <j.m.galema.dontusethis@maartens.nl>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: BCB TCP IP component
References: <3f29cebd$1@newsgroups.borland.com> <3f29d94d@newsgroups.borland.com> <3f29dd02$1@newsgroups.borland.com>
In-Reply-To: <3f29dd02$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.108.11
Message-ID: <3f2a3040$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059729472 129.125.108.11 (1 Aug 2003 02:17:52 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail