deckerego / ampule

A tiny HTTP server made for CircuitPython WiFi devices (like the ESP32)
MIT License
60 stars 10 forks source link

Non-Blocking Examples and Tests #26

Closed deckerego closed 1 year ago

deckerego commented 1 year ago
deckerego commented 1 year ago

@nightmechanic - I merged in the changes you suggested as part of #25 without adding a "poll" mode, instead you can set the socket as "nonblocking" and do other work in the background. See the examples folder for how I tested things out on the ESP32-S2.

deckerego commented 1 year ago

See also https://docs.python.org/3/library/socket.html#timeouts-and-the-accept-method

nightmechanic commented 1 year ago

Thanks a lot, I imagined I didnt use the non-blocking mode properly (enabled it too late i think),

and sorry for not following up, been too busy with work etc. Happy new year!