That was a good hint, thank you!
I created a small component (TmsBrookCompoment). When this component is set to active, a simple thread and a TBrookHttpServerHandler is created. Within the thread's Execute method, the handler's run method is called:
procedure TmsBrookDaemonThread.Execute;
begin
if Assigned(fHandler)
then fHandler.Run
else { report some error here }
end;
This seems to be working fine, I will do a lot more testing - current status is "hooray it compiles, let's ship it". But I will not ship it now. When I finished some further testing, I will attach it this post.
Bit I do have a memory leakage reported in the line "fHandler.Run": one block of 152 bytes, the other one 24 bytes. I cannot trace further into it. Perhaps some socket allocation within TFPCustomHttpServer? I will check this against an original BrookApplication.