I'm using Delphi 2010 and Indy 10.5.8
I'm trying to understand how do we use keepalive feature. I came across a method SetKeepAliveValues where we explicitly set the keepalive timeout period & also found a link according to which connection's ReadTimeout or SessionTimeOut will mimic the same. In my server program I had defined a SessionTimeOut for IdHttpServer
WebServer := TIdHTTPServer.Create(nil);
WebServer.SessionState := True;
WebServer.SessionTimeOut := 30000;
WebServer.AutoStartSession := True;
WebServer.OnCommandGet := CustomOnCommandGet;
and in CustomOnCommandGet I'm checking and setting the CloseConnection property of TIdHTTPResponseInfo as
if LowerCase(ARequestInfo.Connection) = 'keep-alive' then begin
AResponseInfo.CloseConnection := False;
end
else begin
AResponseInfo.CloseConnection := True;
end;
Will this suffice the requirement of setting keepalive or I have to compulsorily set the timeout in SetKeepAliveValues, guide me in setting up the same any additional pointers will be very helpfull
Thanks,