Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Detect when command complete
| Subject: | Re: Detect when command complete |
| Posted by: | "Jon" (jonjaco..@comcast.net) |
| Date: | 3 May 2006 12:53:11 |
>Sounds like your server code is not set up properly then. Please show your
>actual code. You should not be sending a 0 response back to the client for
>each line until each line has actually been processed.
Thank you.
This is the handler for the LINE command:
procedure TForm1.HandleLineCommand(ASender: TIdCommand);
var
D: TData;
LNo: string;
Txt: string;
Ln: Integer;
begin // LINE 123 This is a line of text.
with ASender do
begin
if Params.Count < 2 then
begin
Reply.Assign(Server.ReplyTexts.FindByNumber(401));
Exit;
end;
LNo := Params[0];
Ln := StrToInt(LNo);
Txt := UnparsedParams;
System.Delete(Txt, 1, Length(LNo) + 1);
D := TData(Thread.Data);
while D.SL.Count <= Ln do
D.SL.Add('');
D.FLine := Ln;
D.SL[Ln] := Txt;
end;
end;