LennartHennigs / ESPTelnet

ESP library that allows you to setup a telnet server for debugging.
MIT License
215 stars 35 forks source link

feat(ethernet): Added Ethernet support #49

Closed AlbertoLopSie closed 1 year ago

AlbertoLopSie commented 1 year ago

Abstracted TCPClient and TCPServer classes to make as transparent as possible to switch between network interfaces

Hi Lennart!

I managed to create a transparency class to abstract as much as possible the differences between WiFi and Ethernet interfaces in your Telnet library.

I feel a little rusted on C++ inheritance and probably this same code could be enhanced and made clearer, but at least it:

Please fell free to add or modify anything you like (It's YOUR library after all :-) ) and merge it or not to the main branch. I will use the fork in my repo for my project because I'm in a hurry and it fits my needs. When, in the future, you feel satisfied with the tests you consider and finally merge it, future versions of my project will link it.

Cheers!!

LennartHennigs commented 1 year ago

I made some changes to your code – now it compiles on ESP32 and ESP8266 on both Arduino IDE versions (on Mac).

I moved it to this branch to test it a bit further: https://github.com/LennartHennigs/ESPTelnet/tree/pr-ethernet-static