Article View: borland.public.cppbuilder.internet.socket
Article #4477Re: Send buffer from server to a client
From: Hans Galema
Date: Thu, 27 Jan 2005 16:08
Date: Thu, 27 Jan 2005 16:08
27 lines
1685 bytes
1685 bytes
Vin๏ฟฝcius wrote: > int tamanho = Edit1->Text.Length(); > IdTCPClient1->WriteBuffer(Edit1->Text.c_str(), tamanho); You are not sending the terminating \0. IdTCPClient1->WriteBuffer(Edit1->Text.c_str(), tamanho + 1); Maybe not needed. But if you got funny stringends then add the \0. > But the client don't have this multithread functionality, and don't have the > "Execute" Is not there a IdTCPClient1->ReadBuffer(...) ? > How can I do something similar, send buffers to client AThread->Connection->WriteBuffer(buffer, tamanho + 1); ??? > and read them?? IdTCPClient1->ReadBuffer(...) ? This all is untested as I never used those components. Hans.
Technical Details
Message-ID:
<41f91223$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41f90c54@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b30b06ce9be7f64 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII Date: Thu, 27 Jan 2005 17:08:00 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Send buffer from server to a client References: <41f90c54@newsgroups.borland.com> In-Reply-To: <41f90c54@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <41f91223$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1106842147 129.125.201.248 (27 Jan 2005 08:09:07 -0800) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail