Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: Transfering binary data from TidTCPClient to TidCmdTCPServer - HowTo?
| Subject: | Re: Transfering binary data from TidTCPClient to TidCmdTCPServer - HowTo? |
| Posted by: | "Chris Ueberall" (cuebera..@web.de) |
| Date: | 5 Dec 2007 07:08:06 |
Remy Lebeau (TeamB) wrote:
> [...]
> procedure TForm1.DoItCommand(ACommand: TIdCommand)
> begin
> //...
> if (ok to send data) then
> begin
> ACommand.Reply.SetReply(200, 'Ready to receive data');
> ACommand.SendReply;
> // read binary data, such as with ReadStream() or ReadBytes()...
> end else
> ACommand.Reply.SetReply(500, 'Error!');
> end;
Thnxs, that worked perfect!
Let me remark, for those having the same problem, that one have to use
'ACommand.Context.Connection.IOHandler.ReadStream', as always with Indy,
difficult to find the right instance.property.property.property.method ;-)
--
Chris Ueberall;
none