.. hatte mir das in etwa so vorgestellt:
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
TcpClient : TIdTcpClient;
temp : String;
count : Integer;
begin
Memo1.Clear;
TcpClient := TIdTcpClient.Create(nil);
TcpClient.Host := Edit1.Text;
TcpClient.Port := StrToInt(Edit2.Text);
try
TcpClient.Connect;
if TcpClient.Connected then
begin
if TcpClient.IOHandler.Connected then
begin
TcpClient.IOHandler.Write(Memo2.Text);
while not tcpClient.IOHandler.InputBufferIsEmpty do
begin
temp := TcpClient.IOHandler.ReadLn;
Memo1.Lines.Add(temp);
end;
end;
end;
finally
TcpClient.Disconnect;
TcpClient.Destroy;
end;
end;
[ungetestet]
Grüße
Klaus