[Output:Webcall] Make requests asynchronous #47

Open
opened 2025-10-17 15:56:11 +02:00 by DeltaLima · 0 comments
Owner

At the moment a request blocks the complete codeuntil it's finished. So when our Tasmota Wifi Plug needs 1.42s for it's answer, CanGrow Code is waiting 1.42s for it.

I hope to avoid this with async request. In AsyncTCP lib there is an interesting example:

void fetchAsync(const char *host, std::function<void(const StreamString *)> onDone) {

At the moment a request blocks the complete codeuntil it's finished. So when our Tasmota Wifi Plug needs 1.42s for it's answer, CanGrow Code is waiting 1.42s for it. I hope to avoid this with async request. In AsyncTCP lib there is an interesting example: https://git.la10cy.net/DeltaLima/CanGrow/src/commit/0c27fb6163e97a9f14858bc447064a678e92c6c4/libraries/Async_TCP/examples/FetchWebsite/FetchWebsite.ino#L15
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DeltaLima/CanGrow#47
No description provided.