These are chat archives for IndySockets/Indy

Aug 2018
Aug 18 2018 11:29
Hi. I am trying to manually create a HTTP Server session object in the TidHTTP server OnCreateSession event:
TIdHTTPCreateSession = procedure(ASender:TIdContext; var VHTTPSession: TIdHTTPSession) of object;
Problem is I don't have the RemoteIP value in the event, which is necessary for the session creation. How can I have access to this value?
Also I've created my own session class (subclassed TIdHTTPSession), this is why I am trying to create it manually. Is this allowed? Apart from the RemoteIP issue, it seems to work.
Last question: it would be nice to add a new Data property of TObject to TIdHTTPSession, to make it easy to extend without creating a new class. (I know I can attach objects to Content, TStrings but still).