Delphi - Connection tcp with CSTA protocol?

0
procedure TForm1.Button1Click(Sender: TObject);
Var
   Result: string;
   Tamanho: Integer;
  I, Cont, D: Integer;
begin
   Edit3.Text:= '';
   Cont:= 0;
   Tamanho:= Length(Edit1.Text);
   D:= Tamanho;
   while Cont <= D do
   Begin

     Edit2.Text:= copy(Edit1.Text, Cont, 3);
     IdTCPClient1.IOHandler.WriteLn (Edit2.Text);
     if Cont < 3 then
        Edit3.Text:= Edit3.Text + copy(Edit1.Text, Cont, 2)
     else
        Edit3.Text:= Edit3.Text + copy(Edit1.Text, Cont, 3);
     //ShowMessage(IntToStr(Cont));
     Cont:= Cont + 3;
   End;
   Result := idTCPClient1.LastCmdResult.ToString;
   Label1.Caption:= Result + '  ' + IntToStr (Tamanho);
end;
    
asked by anonymous 13.09.2016 / 14:18

0 answers