Sorry, please forgot my question,
in fact I understand know, my prog enters in the Disconnect proc every
10s (KeepAlive param)
so it's not the solution and it's not the right way !
sincerely
Bruno
Le 15/11/2011 14:54, Bruno Mannina a écrit :
Dear Users,
I try to use the sample HttpAppSrv provide with ICS and I would like
to add a little
thing:
If the user closes the browser, I would like to:
- 1st: Display the disconnection
- 2nd: delete his sessiondata
But If I test in local (127.0.0.1...) what I have (see below):
- no erreur for showing the disconnected text
- Session has been delete, but the message appears one more time when
the TimeOut is over.
And If I test from the net (another computer outside my network), I have:
- an error on the line: MySessionData := ...... (I can't see the error
message sorry)
Any help is welcome!!
thks a lot,
Bruno
I do:
procedure TMainServ.HttpAppSrv1ClientDisconnect(Sender, Client: TObject;
Error: Word);
var
ClientCnx : THttpAppSrvConnection;
MySessionData : TAppSrvSessionData;
begin
ClientCnx := Client as THttpAppSrvConnection;
MySessionData := ClientCnx.WSession.SessionData as TAppSrvSessionData;
Display('Client Disconnected: ' + MySessionData.UserCode);
HttpAppSrv1DeleteSession(Self, ClientCnx.WSession);
end;
Waiting for client on port 20080
[14:52:05 127.0.0.1] : HTTP/1.1 GET /Login.html
[14:52:10 127.0.0.1] : HTTP/1.1 GET /Main.html
Client Disconnected: mannina
Session for user "mannina" deleted
Session for user "mannina" deleted <===== one TimeOut time later !!
--
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
--
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