Skip to content

Conversation

JAndrassy
Copy link
Contributor

@JAndrassy JAndrassy commented Dec 19, 2021

The base type Server is useless because it doesn't declare any method to get a client so it can't be used as base type reference or pointer.
Server inherits from Print, but ESP8266WiFi library's WiFiServer doesn't implement the print-to-all-clients functionality, inheriting from Print only adds virtual methods overhead.
My addition the ArduinoWiFiServer class implements the print-to-all-clients functionality so it needs to inherit from Print.

I created and maintain two networking libraries (WiFiEspAT and EnternetENC) and both don't use the Server class and have a separate class for server with print-to-all-clients functionality. There are no issues with this.

EDIT: It is not a breaking change.

@JAndrassy JAndrassy marked this pull request as draft December 19, 2021 19:51
@JAndrassy JAndrassy marked this pull request as ready for review December 19, 2021 19:53
@JAndrassy JAndrassy marked this pull request as draft December 21, 2021 17:51
JAndrassy and others added 2 commits December 21, 2021 19:03
Fixes esp8266#8416 We install now a private Python and use it for OTA calls, so users do not need to manually install anything.
@JAndrassy JAndrassy force-pushed the WiFiServer_not_inherit branch from b05eb8c to fbe7abb Compare December 21, 2021 18:07
@JAndrassy JAndrassy marked this pull request as ready for review December 21, 2021 18:35
Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
It is a non-sense for WiFiServer to inherit from Print without implementing properly Print functions.
OK to assume it is not a breaking change.

@d-a-v d-a-v merged commit d0cc3a8 into esp8266:master Jan 3, 2022
@JAndrassy JAndrassy deleted the WiFiServer_not_inherit branch November 24, 2023 18:19
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
* WiFiServer - don't inherit from Server class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants