lammertb / libhttp

Multi platform HTTP and HTTPS library
MIT License
957 stars 131 forks source link

System and context initialization mixed up #37

Closed lammertb closed 7 years ago

lammertb commented 7 years ago

A number of system initialization calls are currently in httplib_start(). This makes it impossible to call the function httplib_start() multiple times for multiple contexts to run independent servers with independent functionality, different DOCUMENT_ROOT etc. One-time system initialization functions must be moved to httplib_system_init() to make it possible to start multiple independent contexts.

lammertb commented 7 years ago

httplib_system_init() and httplib_system_exit() have been created for system wide initialization and destroy functionality. Currently startup and shutdown of the windows socket services is in these functions. Further functionality will be moved there when appropriate.