mco_lews_initialize
Prototype
typedef void (*mco_lews_handle_func_h)(lews_connection_context_h context_handle);
MCO_RET mco_lews_initialize(char *interface_addr, int port, mco_sock_params_t *sock_params, mco_lews_handle_func_h fn)
Arguments
interface_addr
Networking interface for accepting connections (default: 0.0.0.0 — any)
port
Port number for accepting connections
sock_params
Additional parameters for the socket
fn
HTTP connections handler function
Description
mco_lews_initialize() initializes the HTTP server parameters, including the networking interface, port,
socket parameters, incoming connections handler, and spawns connection handling threads.
Return Codes
MCO_S_OK
No errors
MCO_E_LEWS_INIT
Initialization error (socket creation error)
Files
Header file:
mcoewslite.h
Source file:
mcoewslite.c
Library:
mcoewslite.a