Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IdHTTPServer and session management Tutorial
#3
Hi Remy, thank you for your reply.  Perhaps it was not a tuto but the link was mentionned to be a "complete example for authentication and users management".

Based on my experience with TidTCPServer I would like to do the following comparisons : 

  1. with TCPServer we can use the "AContext: TIdContext" to manage authentication and specific client management. 
  2. we can use the onconnect and ondisconnect events at the beginning and at the end.
  3. we can create a "TMyClient = class(TidServerContext)" to keep memory of the session between each automatic run of the TCPServer OnExecute
  4. we can use TCPserver.Contexts.Locklist to perform safe operations across active connections (count, send message, .....).
  1. with HTTPServer this has to be done with ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo
  2. we can use OnCreateSession and OnSessionEnd
  3. we can create a "TMySession = class(TIdHTTPSession) to keep memory with the Content
  4. there is also HTTPserver.Contexts.Locklist but I don't see any access to the sessions list and there is also the HTTPServer.SessionList but I have not seen if it's possible to use it to get access to each Session data and how to do it safely.
Could you please confirm the comparisons 1, 2 and 3 and provide me with some help on point 4

Regards
Reply


Messages In This Thread
RE: IdHTTPServer and session management Tutorialrial - by Alan.F - 05-28-2020, 10:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)