Document undocumented WServer member functions
While looking for a way to programmatically stop WServer, I have noticed that these functions are not documented and not available in Doxygen documentation:
These are the ones I notices. There is at least one function(e.g.
WServer::terminate()) whose existence is platform-dependent.
WServer::scheduleStop() is very interesting: Calling
WServer::stop() doesn't cause
WServer::run() to return because, AFAIK,
WServer::waitForShutdown() remains blocked.
WServer::scheduleStop() seems to be the correct way to properly stop the server programmatically and return from
main(). In fact it seems that calling
WServer::waitForShutdown() is blocked renders the server unusable because calling
WServer::resume() doesn't work as expected or shoulkdn't be called in this scenario. Server starts to accept connections, but instead of the applicaton an empty page is served. Readding the application with
WServer::addEntryPoint() before calling
WServer::resume() also doesn't change the outcome.
WServert::start() instead of
WServer::resume() is also not a solution. Consider the following log messages:
[2017-Mar-16 14:46:41.382526] 5852 - [info] "WServer/wthttp: Shutdown: stopping web server." [2017-Mar-16 14:46:51.372525] 5852 - [error] "WServer/wthttp: start(): server already started!"
It would be useful for users if a discussion of programmatic shutdown of WServer was added to WServer documentation and/or Library overview. IMHO, better documentation for
WServer::resume() is also needed.