Article View: borland.public.cppbuilder.internet.socket
Article #2783Re: TIdPeerThread and Syncronize...
From: qyte
Date: Thu, 12 Jan 2006 11:29
Date: Thu, 12 Jan 2006 11:29
45 lines
2319 bytes
2319 bytes
Remy Lebeau (TeamB) wrote:
> "qyte" <gyte@vivodinet.gr> wrote in message
> news:43c5b81c$1@newsgroups.borland.com...
>
>> AThread->Synchronize(ClientRead);
>>
>> But it throws a compiler error.
>
> Please be more specific. What is the exact error message? And which
> version of BCB are you using?
>
>
> Gambit
>
>
TIdTcpConnection *GeneralSocket;
void __fastcall TForm1::ServerSocket1Execute(TIdPeerThread *AThread)
{
int BytesGet=AThread->Connection->ReadFromStack(false,1000,false);
if(BytesGet>0)
{
if(AThread->Connection==GeneralSocket)
AThread->Synchronize(Client1Read);
}
}
[C++ Error] Unit1.cpp(2505): E2285 Could not find a match for
'TIdBaseThread::Synchronize(void)'
I am using BCB6 and indy 9.0.14.
Apart from that i seem to have another problem.
ReadFromStack does not return if there are data left
in the socket which i have not already read.
I mean that the program seems to work if i just
call the read methods instead of using ReadFromStack before
them. Is there a way avoiding that?
I saw another thread that did the following
int
Bytes=Connection->InputBuffer->Size==0?ReadFromStack(false,1000,false):Connection->InputBuffer->Size;
Is that better?
Technical Details
Message-ID:
<43c63cea$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.spamkiller.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43c5b81c$1@newsgroups.borland.com> <43c5d928$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7a3f39d19ff01203 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 12 Jan 2006 13:29:01 +0200 From: qyte <gyte@vivodinet.gr> User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TIdPeerThread and Syncronize... References: <43c5b81c$1@newsgroups.borland.com> <43c5d928$1@newsgroups.borland.com> In-Reply-To: <43c5d928$1@newsgroups.borland.com> Content-Type: text/plain; charset=windows-1253; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.171.210.195 Message-ID: <43c63cea$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137065194 83.171.210.195 (12 Jan 2006 03:26:34 -0700) Lines: 45 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.spamkiller.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail