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

code structure #5

Closed
andig opened this issue Jan 25, 2016 · 5 comments
Closed

code structure #5

andig opened this issue Jan 25, 2016 · 5 comments

Comments

@andig
Copy link
Contributor

andig commented Jan 25, 2016

During debugging I kept being confused by AsyncWebServerHandlerImpl ws WebHandlers, the sooner only containing static and callback handlers. Wouldn't it make sense to move those to the same file?

@me-no-dev
Copy link
Owner

AsyncWebServerHandlerImpl keeps all implementations of the AsyncWebHandler (thus the name) the cpp file has their source. It should not be needed for inclusion unless you extend one of the classes there. They all look to the server as AsyncWebResponse and the server treats them as such (like Print implementations)

@andig
Copy link
Contributor Author

andig commented Jan 25, 2016

AsyncWebServerHandlerImpl keeps all implementations of the AsyncWebHandler

I found it confusing as part (and only part, e.g. not the constructor) of the AsyncStaticWebHandler implementation in turn is in WebHandlers.cpp. Also those are the only two files prefixed with Async.

But definitely a minor thing, please feel free to close.

@me-no-dev
Copy link
Owner

all headers have Async in their name (apart from the StringArray). Source files do not because they can not be mixed up with other source files (you include the headers and not the source) :)
Some names will probably change in a very near future :) @sticilface has done some major work to make ArduinoJson async as well :)

@andig
Copy link
Contributor Author

andig commented Feb 10, 2016

Fixed by 40d5d44 I would say- thank you!

@andig andig closed this as completed Feb 10, 2016
@me-no-dev
Copy link
Owner

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants