gilmaimon / ArduinoWebsockets

A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
GNU General Public License v3.0
482 stars 97 forks source link

Multi platform support #65

Open gilmaimon opened 4 years ago

gilmaimon commented 4 years ago

Many users ask for support in various boards, supporting only esp8266 and esp32 is not enough and could take the library a big step forward.

A possible solution could be a generic client that uses the Arduino Client interface and can work with anything provided by the user.

This might require deep reworks, and it should be considered. Alternatively it is possible to patch things around.

This is surely a big deal, and hopefully everyone reading this issue and wanting to contribute will watch for future changes and give their opinion on it, hopefully with the many people already using the library, the development process will be more collaborative.

Adding Support For a New Board

Implement the interfaces TcpClient and TcpServer for your board. Here is an example implementation of esp32 client and server (client uses this generic esp code) Register it in ws_common.hpp. Meaning: add a #elif defined for your board. This is the process generally, once you've done that keep looking at ws_common.hpp, it has most of the board-specific #defines.

I'm also happy to help here or on a new issue / email.

Gil.

arnoson commented 4 years ago

I would like to contribute to support the Teensy 4.1 with it's build in ethernet. Where would be a good place to start?

gilmaimon commented 4 years ago

Hi @arnoson!

I had a comment in the past about how I think it's best to start. I was sure I linked it here, but looks like I didn't.

I edited the issue, you can now read more about it 👍

Thanks, Gil.

arnoson commented 3 years ago

I have managed to add support for Teensy 4.1 (: I'm not an experienced C++ developer, but the ArduinoWebsockets code is really well written, so it's easy to understand what's going on. It takes a bit of trial and error, but I would encourage everyone to try to add support if the board you want to use is missing!