Comments (1)
usually you set a flag in the async callback and then execute in the loop:
static bool rebootRequested = false;
void onData(void* arg, AsyncClient* client, void *data, size_t len){
char strData[len+1];
memcpy(strData, data, len);
strData[len] = 0;
if(strcmp("reset", strData) == 0){
rebootRequested = true;
client->close(true);
}
}
void loop(){
if(rebootRequested){
ESP.reset();
}
//other loop code
}
from asynctcp.
Related Issues (20)
- Examples from ESPAsyncTCP and update to Readme HOT 1
- Crash on multiple async reqs HOT 52
- [FR] Project Examples for PlatformIO Registry HOT 1
- espcam stream with TCP and receive UDP packets at same time HOT 1
- [FR] Project Examples for PlatformIO Registry
- Examples for the AsyncTCP HOT 1
- [ 32449][E][AsyncTCP.cpp:1313] begin(): failed to start task
- How to use the reply from onData
- AsyncTCP Conversion issue
- How to pause receiving uploads from client HOT 1
- any chance this will be published under a permissive license (e.g. Apache, MIT, MPL) HOT 6
- .pio/libdeps/esp32doit-devkit-v1/AsyncTCP/src/AsyncTCP.cpp:85:8: : 'xQueueHandle' does not name a type; HOT 3
- [FR] Project Examples for PlatformIO Registry
- Install HOT 1
- ESP32 - WLED Unhandled Exception on MQTT Connection HOT 1
- fatal error: sdkconfig.h: No such file or directory HOT 2
- Problem when connecting via WIFIAP HOT 2
- AsyncUDP is conflicting with AsyncTCP
- How am I supposed to use AsyncTCP? Examples please!
- [FR] Project Examples for PlatformIO Registry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asynctcp.