Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
sl: tstrings; i:integer;
begin
sl := tstringlist.Create;
sl.add(Edit1.text);
sl.add(Edit2.text);
sl.add(Edit3.text);
with IdTCPClient1 do
begin
connect;
writestrings(sl,true);
disconnect;
sl.Free;
end;
end;
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
var sl: tstrings;
begin
with AThread.Connection do
begin
sl:=tstringlist.Create;
readstrings(sl);
memo1.Lines.Assign(sl);
sl.free;
end;
end;
So funst es ... selbst ist der Nub.