🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Send buffer from server to a client

#4476
From: Vin�cius
Date: Thu, 27 Jan 2005 15:44
30 lines
1850 bytes
Helllo,

    i'm making some simple aplication server/client, and I already send 
buffers from client to the server, like this:

CLIENT

void __fastcall TForm1::Button3Click(TObject *Sender)
{
   int tamanho = Edit1->Text.Length();
   IdTCPClient1->WriteBuffer(Edit1->Text.c_str(), tamanho);
}

SERVER
inside the execute

      TIdBuffer * buffer = new TIdBuffer;
      int tamanho = AThread->Connection->ReadFromStack();
      char * bufferread = new char[tamanho];
      AThread->Connection->ReadBuffer(bufferread, tamanho);
     // buffer->ReadBuffer(bufferread,tamanho);
      ListBox1->Items->Add((AnsiString)bufferread);


But the client don't have this multithread functionality, and don't have the 
"Execute"
How can I do something similar, send buffers to client and read them??

Thanks
Vin�cius 
Technical Details
Message-ID: <41f90c54@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.netcologne.de!newsfeed-fusi.netcologne.de!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b30b06ce9be7f64,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII
Reply-To: "Vin�cius" <vgalo2000@yahoo.com.br>
From: "Vin�cius" <vgalo2000@yahoo.com.br>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Send buffer from server to a client
Date: Thu, 27 Jan 2005 13:44:20 -0200
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 200.251.67.44
Message-ID: <41f90c54@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106840660 200.251.67.44 (27 Jan 2005 07:44:20 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.netcologne.de!newsfeed-fusi.netcologne.de!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail