| 12345678910111213141516171819 |
- #ifndef __WEB_SERVER_H__
- #define __WEB_SERVER_H__
- #include <stddef.h>
- /* Lightweight embedded web server for runtime configuration.
- * Listens on 0.0.0.0:<port>, serves a single-page config UI and a tiny
- * JSON API. Zero cost while no client is connected (blocking accept). */
- #define WEB_SERVER_PORT_DEFAULT 8080
- #define WEB_SERVER_PASS_DEFAULT "3730"
- /* Start the web server on a detached background thread.
- * config_path is the channels.conf this process was started with; edits are
- * applied by rewriting the file and restarting the service unit.
- * Returns 0 on success (thread started), -1 on bind/creation error. */
- int web_server_start(const char *config_path, int port, const char *password);
- #endif
|