-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Convert ESP8266WebServer* into templatized model #5982
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
Conversation
Supercedes esp8266#4912 Refactor the three versions of ESP8266WebServer and *WebServerSecure to a single templated class. Use "using" to enable old, non-templated names to b used (so no user changes required to compile or run). Fixes esp8266#4908 and clean up the code base a lot. Basic tests run (the ones in the example code). No code changes are required in userland except for setting the SSL certificates which now use a cleaner "getServer()" accessor and lets the app use the native BearSSL calls on the WiFiClientSecure object. @devyte should be proud, it removes virtuals and even has template specialization...
Need to remove dot-a linkage since there are no .cpp files in the directory anymore due to templates.
db8aefb
to
9a56e85
Compare
Allow existing code to use the same well known names for HTTPUpdateSecure.
Overall, nice work! I think I cried a little with so many virtuals removed. I see that request handler still has some, though. I do have some comments about code structure, namespaces and refactoring, but it will take me a bit to go through the whole PR for the specifics. In the meantime, some comments and questions:
|
|
Remove the ClientType template parameter from all objects. Simplifies the code and makes it more foolproof. Add a "using" in each server to define the type of connection returned by all servers, which is then used in the above templates automatically.
Got 3, 4, and 6 all taken care of. |
c5abd89
to
3a8e1d4
Compare
e217feb
to
9705872
Compare
7d9691a
to
da812db
Compare
Make the simple mock test CI job pass and clean up any spurious warnings in the test directory. There still are warnings in the libraries and core, but they should be addressed in a separate PR.
Supercedes #4912
Refactor the three versions of ESP8266WebServer and *WebServerSecure to a
single templated class. Use "using" to enable old, non-templated names to b
used (so no user changes required to compile or run).
Fixes #4908 and clean up the code base a lot.
Basic tests run (the ones in the example code).
No code changes are required in userland except for setting the SSL
certificates which now use a cleaner "getServer()" accessor and lets the
app use the native BearSSL calls on the WiFiClientSecure object.
@devyte should be proud, it removes virtuals...