mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
update Makefiles and symlinks
This commit is contained in:
1 parent
2c6fc99c68
commit
ddbfa06bcc
18 files changed
+134
-53
No files matched your search
@@ -2,7 +2,9 @@
|
||||
// All rights reserved
|
||||
|
||||
#include "mongoose.h"
|
||||
|
||||
const char *s_listening_url = "http://0.0.0.0:8000";
|
||||
const char *s_listening_surl = "https://0.0.0.0:8443";
|
||||
|
||||
void device_dashboard_fn(struct mg_connection *, int, void *, void *);
|
||||
|
||||
@@ -12,6 +14,10 @@ int main(void) {
|
||||
mg_mgr_init(&mgr);
|
||||
mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, NULL);
|
||||
MG_INFO(("Listening on %s", s_listening_url));
|
||||
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
|
||||
mg_http_listen(&mgr, s_listening_surl, device_dashboard_fn, "");
|
||||
MG_INFO(("Listening on %s", s_listening_surl));
|
||||
#endif
|
||||
while (mgr.conns != NULL) mg_mgr_poll(&mgr, 500);
|
||||
mg_mgr_free(&mgr);
|
||||
return 0;
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
#include "mongoose.h"
|
||||
|
||||
#if !defined(MQTT_SERVER)
|
||||
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
|
||||
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
|
||||
#define MQTT_SERVER "mqtts://broker.hivemq.com:8883"
|
||||
#else
|
||||
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
|
||||
#endif
|
||||
#endif
|
||||
#define MQTT_PUBLISH_TOPIC "mg/my_device"
|
||||
#define MQTT_SUBSCRIBE_TOPIC "mg/#"
|
||||
|
||||
Reference in new issue
Block a user