mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
move UART bridge -> tutorials
This commit is contained in:
commit
aeda7e5520
66 files changed
+56
-40
No files matched your search
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2022 Cesanta Software Limited
|
||||
// All rights reserved
|
||||
|
||||
#include "mongoose.h"
|
||||
const char *s_listening_url = "http://0.0.0.0:8000";
|
||||
|
||||
void uart_bridge_fn(struct mg_connection *, int, void *);
|
||||
|
||||
int main(void) {
|
||||
struct mg_mgr mgr;
|
||||
mg_log_set(MG_LL_DEBUG);
|
||||
mg_mgr_init(&mgr);
|
||||
mg_http_listen(&mgr, s_listening_url, uart_bridge_fn, &mgr);
|
||||
MG_INFO(("Listening on %s", s_listening_url));
|
||||
while (mgr.conns != NULL) mg_mgr_poll(&mgr, 500);
|
||||
mg_mgr_free(&mgr);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user