Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Read data with TIdTCPClient
| Subject: | Read data with TIdTCPClient |
| Posted by: | "Grant Brown" (gra..@sitedoc.com.au) |
| Date: | 21 Aug 2006 02:51:01 |
Hi,
Is the following the correct manner in which to read records using the
TIdTCPClient component in Indy 10.
If not could someone show me how to do this.
Also how would I gard against a lost connection during the repeat loop
with IdTCPClient do
begin
repeat
SendCmd(CmdStr_NewLic);
sleep(50);
if LastCmdResult.NumericCode in [203,204] then
begin
Connection.IOHandler.ReadBytes(ByteBuf, SizeOf(ByteBuf));
BytesToRaw(ByteBuf, NewLicRec, SizeOf(NewLicRec));
end;
until LastCmdResult.NumericCode = 204;
end;
TIA
Kind Regards
Grant Brown
--