Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IdHTTPServer and session management Tutorial
#5
Thanks Remy

I've done the following with success :
Code:
procedure TForm1.IdHTTPServer1SessionStart(Sender: TIdHTTPSession);
begin
  Sender.Content.Create;
  Sender.Content.AddPair('phase','1');
end;

procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
  phase : string;
begin
  if ARequestInfo.Session <> nil then phase := ARequestInfo.Session.Content.Values['phase'];
  ....
end;

Concerning the threadlist, with IdHTTPServer1.SessionList I don't see how I can lock the list. Please can you help me ?
Reply


Messages In This Thread
RE: IdHTTPServer and session management Tutorialrial - by Alan.F - 06-03-2020, 02:04 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)