Forum: Netzwerke
Delphi
by tomate007,
29. Jun 2007
Also... was soll ich dann nehmen??
Auch wenn ich nen Button setze mit Disconnect und mach dahinter:
ClientSocket1.Close;
kommt der gleiche Fehler obwohl die Form ja noch offen ist...
Also kann man sagen, egal wann ich
Forum: Netzwerke
Delphi
by tomate007,
29. Jun 2007
So wieder mal was zum ServerSocket
Und zwar, wenn ich den Client schließe, dann soll er ja die Connection zum Server abbauen. Also hab ich es so gemacht:
procedure TForm1.FormDestroy(Sender: TObject);
begin
if (ClientSocket1.Active) then // noch online?
ClientSocket1.Close; // ja, dann trennen
end;