Regarding accepted sockets: that's how I solved the problem for now:
procedure TServer.TriggerClientConnect(Client: TWSocketClient; Error: Word);
begin
inherited;
if Error <> 0 then Exit;
with TSrvClient(Client) do
begin
TimeoutSampling := 1000;
TimeoutConnect := InactiveTimeout;
TimeoutIdle := InactiveTimeout;
OnTimeout := ClientTimeout;
TimeoutStartSampling;
Counter.SetConnected; // <-- init Counter manually
end;
end;
This good method might be called in TimeoutStartSampling after Counter creation
when state is wsConnected, and after socket accepting too.
--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be