[fpc-pascal] fcl-web TFPHttpServer component problem

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Nov 28 16:15:22 CET 2011


On 28/11/2011, michael.vancanneyt at wisa.be <michael.vancanneyt at ....> wrote:
>
> The mistake you make is that you create a loop in the thread;
> The thread does not need a loop. It just needs to set Active to true:
>
> Procedure TMyServerThread.Execute;
>
> begin
>    MyServer.Active:=True;
> end;

OK thanks, I got it working now but it is not ideal yet.

It is still problematic if you try starting & stopping the HTTP Server
because if you stop it, TThread.Execute completes, thus you can't
restart it again, you need to create a new thread instance. I guess
not the end of the world for my simple example, but might be for other
more complex apps. But then, that was probably not the design goal of
this component.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list