> Hey Michael,
>
>>
>> I need to start the server and continue with my own work and also be
>> able to shut it down and what not when I want to.
>> When I tried to do this (I copied the code from Wrun) it seemed to
>> require me to include much of the "internal source code" of Witty and I
>> started thinking there has to be a better way.
>
> I had never thought about this use "embedded server" use-case.

Strange, that is the "only use-case" I thought of when I read about witty
in DDJ a while back.
It seemed to me to be the perfect choice for existing applications to
easily add a "WEB UI" :)

>
> You were looking at the right part of the code (there are two files
> though, PosixMain and WinMain, which contain a bit of copy and paste
> code). They could be encapsulated in an embeddable 'WServer' class
> like you suggest, which is then simply used by WRun(). This WServer
> class would be public API, but only implemented for the builtin-http
> (and not for the fastcgi connector).

Sounds reasonable to me, and would do what I want I think...

>
> One limitation currently is that since Wt expects only one 'server'
> per application, it uses a number of static data structures, so you
> would only be able to instantiate a single WServer class (with the
> current implementation, but that could be changed in the future with
> some reorganisation in the code).

Not that important for me as I only want to run one server anyways.

(I will though, possibly, be interested in mounting virtually (if I can
figure out how) other parts of the program from the same server (ie have
other witty "instances" that are relayed to this server).
But only one http-server.)

>
> Unless you feel inclined to implement it, I will add it (to the bottom
> of) my TODO list?

I can have a look at it, since I am new to witty I doubt you want to use
my code, but I can certainly submit-back any thing I write to get this
working.
I shall see what I can come up with.

// Michael Medin
>
> Regards,
> koen
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to