Files
arduinoWebSockets/examples/esp32_pio/CustomNetworkClient/readme.md
Moritz Ulmer 8a261ade21 Allow definition of custom network interfaces (#921)
* Allow definition of custom network interfaces

* Create network client interface class

* Change to PIMPL approach

* Add example for custom network clients

Why:

- Show users how to use multiple network interfaces

This change addresses the need by:

- Adding an example PIO project to use Wi-Fi and GSM/LTE

* Add WebSockets prefix to normal and secure client

Why:

- Avoid name collision
- Fix broken reconnect change

This change addresses the need by:

- Adding WebSockets prefix to all custom clients
- Marking custom client as secure in clientDisconnect()
  - Remove broken fix for reconnecting
2025-08-13 13:39:38 +02:00

462 B

This example project shows how to use a custom NetworkClient class to switch between two underlying network interfaces.

In this case it shows how a board can support Wi-Fi as well as GSM/LTE connectivity. It uses a shim to switch between the two network interfaces, thereby allowing a single binary to handle both interfaces without needing to reboot. This example can be extended to cover other network interfaces that conform to the Client() class interface.