mco_bool mco_lews_has_been_stopped(void);
This function checks whether a shutdown request has been issued for the EWSLite server by calling
mco_lews_stop().It returns the current state of the internal shutdown flag. This function is thread-safe and can be called from any context (e.g., signal handlers, worker threads) to determine if the server loop should terminate.
Typically used inside the main server loop or connection handlers to perform graceful shutdown:
// Example: checking shutdown status in a custom handler while (!mco_lews_has_been_stopped()) { // Process incoming connections ... }
1 (MCO_YES)mco_lews_stop().0 (MCO_NO)