mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-24 21:30:39 +08:00
make Mosquitto happy
This commit is contained in:
parent
82916a1cef
commit
1f37595200
@ -98,8 +98,9 @@ int main(void) {
|
|||||||
bool done = false; // Event handler flips it to true when done
|
bool done = false; // Event handler flips it to true when done
|
||||||
mg_mgr_init(&mgr); // Initialise event manager
|
mg_mgr_init(&mgr); // Initialise event manager
|
||||||
mg_log_set(MG_LL_DEBUG); // Set log level
|
mg_log_set(MG_LL_DEBUG); // Set log level
|
||||||
mg_ws_connect(&mgr, s_url, fn, &done, NULL); // Create client connection
|
mg_ws_connect(&mgr, s_url, fn, &done, "%s", // Create client connection
|
||||||
while (done == false) mg_mgr_poll(&mgr, 1000); // Event loop
|
"Sec-Websocket-Protocol: mqtt\r\n"); // Request MQTT protocol
|
||||||
mg_mgr_free(&mgr); // Finished, cleanup
|
while (done == false) mg_mgr_poll(&mgr, 1000); // Event loop
|
||||||
|
mg_mgr_free(&mgr); // Finished, cleanup
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user