Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor WiFiUDP for branch 3.0.x #7853

Closed
1 task done
mrengineer7777 opened this issue Feb 15, 2023 · 5 comments
Closed
1 task done

Refactor WiFiUDP for branch 3.0.x #7853

mrengineer7777 opened this issue Feb 15, 2023 · 5 comments
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32
Milestone

Comments

@mrengineer7777
Copy link
Collaborator

Related area

WiFi

Hardware specification

NA

Is your feature request related to a problem?

cbuf in WiFiUDP may cause in crash on low memory and is not the preferred way to track incoming data.

Describe the solution you'd like

As noted by @me-no-dev, WiFiUDP "should transition from using cbuf to something more FreeRTOS related, like Queue (for single bytes) and Ringbuf (for multiple bytes). cbuf should really get phased out and removed in Arduino 3.0.0".

Describe alternatives you've considered

WiFiUDP generally works well. Refactoring is a long term goal targeting 3.0.0 branch or above.

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@mrengineer7777 mrengineer7777 added the Type: Feature request Feature request for Arduino ESP32 label Feb 15, 2023
@mrengineer7777 mrengineer7777 changed the title Refactor WiFiUDP Refactor WiFiUDP for branch 3.0.x Feb 15, 2023
@VojtechBartoska VojtechBartoska added this to the 3.0.0 milestone Feb 16, 2023
@mrengineer7777
Copy link
Collaborator Author

I was looking into this and discovered that AsyncUDP is already well structured and offers better functionality. Thanks to https://esp32.com/viewtopic.php?t=30724.
WiFiUDP appears to be an implementation for https://github.com/arduino/ArduinoCore-API/blob/master/api/Udp.h

@mrengineer7777
Copy link
Collaborator Author

mrengineer7777 commented Feb 16, 2023

WiFiUDP is the ONLY library that uses cbuf.
Edit: also used in ESPAsyncwebserver (third party library).

@Jason2866
Copy link
Collaborator

Maybe this solves strange issues seen with ESPAsyncwebserver.

@mrengineer7777
Copy link
Collaborator Author

Will be closed by #7860 and #7868 .

@VojtechBartoska
Copy link
Collaborator

Mentioned PRs above have been merged, closing as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32
Projects
Development

No branches or pull requests

3 participants