okok war einfach zu faul sorrrry!
Delphi-Quellcode:
procedure TServer.tcpServerConnect(AThread: TIdPeerThread);
var Client:Tclient;
begin
Client.IP := Athread.Connection.Binding.PeerIP;
Client.Name := 'Connected';
Client.ListLink := Form1.Listbox1.items.Count;
Client.Thread := Athread;
Athread.Data := Client;
Clientsliste.Add(Client);
listbox.Items.Add('asdf');
Athread.Connection.WriteLn(Welcmsg);
end;
procedure TServer.tcpServerDisconnect(AThread: TIdPeerThread);
var Client:TClient;
begin
Client := @AThread.Data;
Memofeld.Lines.Add(Client.Name + ' hat uns verlassen');
Clientsliste.Delete(Client.ListLink);
Listbox.Items.Delete(Listbox.Items.IndexOf(Client.Name));
Client.Free;
AThread.Data := nil;
end;
so das wärs... hoffentlich kann mir jemand helfen