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 :
Regards
Based on my experience with TidTCPServer I would like to do the following comparisons :
- with TCPServer we can use the "AContext: TIdContext" to manage authentication and specific client management.
- we can use the onconnect and ondisconnect events at the beginning and at the end.
- we can create a "TMyClient = class(TidServerContext)" to keep memory of the session between each automatic run of the TCPServer OnExecute
- we can use TCPserver.Contexts.Locklist to perform safe operations across active connections (count, send message, .....).
- with HTTPServer this has to be done with ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo
- we can use OnCreateSession and OnSessionEnd
- we can create a "TMySession = class(TIdHTTPSession) to keep memory with the Content
- 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.
Regards