-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Server.h not matching Arduino API #2704
Comments
And your proposal is? We need to define the port for the server. How do those libraries you point to handle that? |
You were presented with an issue template when you clicked |
port is set with constructor for server in all Arduino networking libraries implementing Client and Server class. here is an answer on how to change the port later.
I don't have this problem, I don't use esp32 in a project. I only try to make my libraries compatible with it. I created this issue because I know about this problem a long time and the new release still has it and added one more similar in Client. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This stale issue has been automatically closed. Thank you for your contributions. |
@me-no-dev Is there a fix for this? |
there will be |
Would be soooooo coool. Curently building with the unapproved PR with unknow side affect, hands shaking @ every line :) |
Move port definition to constructor and to it like EthernetServer from arduino-libs Workaround till then, for using WifiServer and EthernetServer (from Ethernet.h) you can define in both begin Functions in Server.h with a default implementation, non virtual:
It's not nice but it works when you want to use WifiServer and EthernetServer in your projects |
This issue should not be closed as it has not been resolved. I'm just a user trying to build some cross platform Arduino libraries. I just spent an hour trying to figure this issue out only to find a dozen or so closed issues scattered across a bunch of repos with suggestions of lame workarounds but no fix.'
The fix is to change esp32 to use @per1234 articulated the fix well here: arduino-libraries/Ethernet#88
I get the sense that the esp32 maintainers do not want to do this, butI can't understand why. In the meantime, if someone can suggest how I can get my cross-platform Arduino library build in platformio to automatically patch the esp32 https://github.com/arduino-libraries/Ethernet/pull/107/files |
The Arduino Server class has pure virtual begin() without parameters. The esp32 core Server.h has pure virtual begin() with parameter. Arduino networking libraries like Ethernet and UIPEthernet don't compile on esp32 core because they implement begin without parameter as required by Arduino API.
The text was updated successfully, but these errors were encountered: