You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do you set the server to be non-blocking in the main loop , in other words to allow other code/functions to run ?
For example I have the following :
void loop() {
server.handleClient(); // run the web server
//websockets server
WebsocketsClient client = wsserver.accept();
if (client.available()) {
WebsocketsMessage msg = client.readBlocking();
// log
Serial.print("Got Message: ");
Serial.println(msg.data());
}
// return echo
client.send("Echo: " + msg.data());
// close the connection
client.close();
}//endof if client.available
//end of webSocket Server
SOME_OTHER_FUNCTION();
SOME_OTHER_FUNCTION_TWO();
//etc
//start from beginning of loop again
}
Look forward to your reply as always :-)
Den
The text was updated successfully, but these errors were encountered:
Hi Gil
How do you set the server to be non-blocking in the main loop , in other words to allow other code/functions to run ?
For example I have the following :
Look forward to your reply as always :-)
Den
The text was updated successfully, but these errors were encountered: