me-no-dev / ESPAsyncTCP

Async TCP Library for ESP8266
GNU Lesser General Public License v3.0
758 stars 394 forks source link

About waiting for data #144

Closed fabitom closed 4 years ago

fabitom commented 4 years ago

Hi, is there any way to wait some time when there is too much data ? I just trying ESPAsync client and in example provided I need wait. I fill my data buffer in client->onData but when my buffer is full I need wait some time (other process takes data from my buffer). When I use delay(1) inside client->onData() function program will crash. I probably don't quite understand the concept of client->onConnect ->onData ;( Can I use delay() in onData function ?

fabitom commented 4 years ago

Ok, I think I need SyncClient for that :)