mco_lews_stop

Prototype

    MCO_RET mco_lews_stop();

Description

The mco_lews_stop() function signals the web server to stop accepting new connections and terminate the main event loop started by mco_lews_start().

This function is typically called from another thread to initiate graceful shutdown. It does not wait for the server loop to exit — the calling thread should ensure that mco_lews_start() has completed before proceeding with cleanup.

If the server is not running, this function has no effect and returns MCO_S_OK.

Return Value

MCO_S_OK
Signal sent successfully (or server was not running).

Files

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