I would like to hard shutdown a TFPCustomHttpServer without waiting. I think it would be possible to do this by calling the ConnectionHandler protected property's CloseSockets method if I could access it through code like this:
program main;
{$mode Delphi}
uses
FPHttpServer;
type
MyHttpServer = class(TFPCustomHttpServer)
public
procedure CloseSockets;
end;
procedure MyHttpServer.CloseSockets;
begin
if Assigned(ConnectionHandler) then
ConnectionHandler.CloseSockets;
end;
var
MyHttp: MyHttpServer;
begin
MyHttp := MyHttpServer.Create(Nil);
MyHttp.CloseSockets;
MyHttp.Free;
end.
However that fails to compile with:
main.pas(16,15) Error: Identifier not found "ConnectionHandler"
main.pas(17,5) Error: Identifier not found "ConnectionHandler"
Any tips?