# mco_lews_has_been_stopped
RT

### Prototype

        mco_bool mco_lews_has_been_stopped(void);

### Description

> 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
>             ...
>         }

### Return Value

`1` (`MCO_YES`)
A shutdown request has been issued via `mco_lews_stop()`.
`0` (`MCO_NO`)
No shutdown request has been made.

### Files

Header file:
mcoewslite.h
Source file:
mcoewslite.c
Library:
mcoewslite.a