#ifndef NL_HTTP_SERVER_H #define NL_HTTP_SERVER_H #include #include "net/nl_api.h" #define NL_HTTP_PORT 3333 /* Incremented once per accept() timeout and once per handled connection; app_main's * watchdog feed checks it to make sure the HTTP task is still alive, not just the light * task. The listen socket's 2 s accept timeout keeps this ticking even without requests. */ extern volatile uint32_t nl_http_beat; /* Serves one connection at a time (listen backlog 4, 5 s receive timeout). */ void nl_http_server_start(const nl_api_ctx_t *ctx); #endif