marian-craciunescu / ESP32Ping

Ping library for ESP32 Arduino core
GNU Lesser General Public License v2.1
110 stars 58 forks source link

non blocking ping #45

Open infrafast opened 9 months ago

infrafast commented 9 months ago

Hello, the ping is currently blocking and prevents it from being used in loop for instance. Is is possible to have this non blocking ? Thanks BR

StefanL38 commented 4 months ago

I second that. How the heck does it take 2 to 14 seconds until the ping.ping-thing has processed the ping???

If I do a ping from my laptop the answer is received withing 0,01 seconds! Sure an ESP32 is not a 2 GHz 64bit machine. Still needing 2000 to 14000 milliseconds until this function comes to an end is unacceptable slow. Man anything else than this ping-function is faster sending a UDP-message including the answer

The source-code does somehow mention something about "cb" which might be a callback So what about expanding the library to have a callback-function?