-
Notifications
You must be signed in to change notification settings - Fork 268
Add possibility to change server tcp port in void setup. No more fixed port! #39
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
base: master
Are you sure you want to change the base?
Conversation
…d port! Before this mofication: EthernetServer server(80); void setup() { //some stuff here server.begin(); //User can't change initial port value //other stuff here } Now: EthernetServer server; //without port declaration but still working old declaration system... void setup() { //some stuff here unsigned int tcp = EEPROM.read(x) server.begin(tcp); //User can now use a different port, maybe saved in eprom directly from the sketch in a configuration page that permise to choice a value for the tcp port... //other stuff here } Many thanks to Arduino's forum user: SukkoPera
Hi @5a2v0, Thanks for submitting this. I'm wondering if the following is a better way to achieve the same functionality without changing the API. I'm concerned about fragmenting the API, because other network libraries that extend Server (like WiFi101) would not have the change.
|
@sandeepmistry |
@zoomx yes, sorry. I will update my previous comment. |
In the newest WiFi library WiFiS3 for the Uno R4, Arduino has overview of Server implementations in libraries https://github.com/JAndrassy/Arduino-Networking-API/blob/main/ArduinoNetAPILibs.md#server-class |
Before this modification:
Now:
Many thanks to Arduino's forum user: SukkoPera