Article View: borland.public.cppbuilder.internet.socket
Article #5355Re: Problem with sending data with TCS/TSS (data has been received mixed and/or damaged)
From: Remy Lebeau (TeamB)
Date: Thu, 19 Aug 2004 16:40
Date: Thu, 19 Aug 2004 16:40
20 lines
1525 bytes
1525 bytes
"Vladimir Stefanovic" <antivari@ptt.yu> wrote in message
news:41245031$1@newsgroups.borland.com...
> The bytes has been sent but the destination copy
> is usually mixed and/or damaged in some parts.
That is because when your server is receiving new data, it is overwriting
the existing buffered data instead of appending the new data to the end of
the buffer. You need to change this line:
Socket->ReceiveBuf( InboxDataBuffer->Memory, IncomingSize );
To this instead:
Socket->ReceiveBuf( &((LPBYTE)(InboxDataBuffer->Memory))[OldSize],
IncomingSize );
Gambit
Technical Details
Message-ID:
<4124d7ab@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41245031$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9d2d5d657ea2710a X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41245031$1@newsgroups.borland.com> Subject: Re: Problem with sending data with TCS/TSS (data has been received mixed and/or damaged) Date: Thu, 19 Aug 2004 09:40:12 -0700 Lines: 22 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: 68.69.17.41 Message-ID: <4124d7ab@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092933547 68.69.17.41 (19 Aug 2004 09:39:07 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail