diff --git a/README.md b/README.md index bdaa379a..07296abd 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ * [For Teensy 4.1 using NativeEthernet](#for-teensy-41-using-nativeethernet) * [For Teensy 4.1 using QNEthernet](#for-teensy-41-using-qnethernet) * [To use ESP8266/ESP32 native WiFi](#to-use-esp8266esp32-native-wifi) +* [To use RP2040W built-in WiFi](#To-use-RP2040W-built-in-WiFi) * [Examples](#examples) * [For ESP32 boards](#for-esp32-boards) * [For ESP8266 boards](#for-esp8266-boards) @@ -102,7 +103,8 @@ * [For Portenta_H7 boards using Vision-shield Ethernet. New in v1.7.0](#for-portenta_h7-boards-using-vision-shield-ethernet-new-in-v170) * [For Portenta_H7 boards using Murata WiFi. New in v1.7.0](#for-portenta_h7-boards-using-murata-wifi-new-in-v170) * [For RP2040 boards using WiFiNINA. New in v1.8.0](#for-rp2040-boards-using-wifinina-new-in-v180) - * [For ESP32 boards using Ethernet. New in v1.11.0](#for-ESP32-boards-using-Ethernet-new-in-v1110) **New** + * [For ESP32 boards using Ethernet. New in v1.11.0](#for-ESP32-boards-using-Ethernet-new-in-v1110) **New** + * [For RP2040W boards using built-in WiFi. New in v1.13.0](#for-RP2040W-boards-using-built-in-WiFi-new-in-v1130) **New** * [Example SAMD-Client_SINRIC](#example-samd-client_sinric) * [1. File SAMD-Client_SINRIC.ino](#1-file-samd-client_sinricino) * [2. File defines.h](#2-file-definesh) @@ -192,6 +194,9 @@ This [**WebSockets_Generic2** library](https://github.com/khoih-prog/WebSockets2 12. **RP2040-based boards, such as Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040**, using WiFiNINA or Ethernet +12. **RP2040W boards, such as RASPBERRY_PI_PICO_W**, using Cyw43439 WiFi or Ethernet + + --- #### Currently supported WiFi shields/modules @@ -201,6 +206,7 @@ This [**WebSockets_Generic2** library](https://github.com/khoih-prog/WebSockets2 3. U-Blox W101, W102 using [`WiFiNINA_Generic library`](https://github.com/khoih-prog/WiFiNINA_Generic) 4. ESP32 and ESP8266 WiFi 5. **Portenta_H7 built-in Murata WiFi** +6. **RP2040W built-in CYW43439 WiFi** --- @@ -236,7 +242,7 @@ This [**WebSockets_Generic2** library](https://github.com/khoih-prog/WebSockets2 9. [`ESP32 Core 2.0.5+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/) 10. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS. 11. [`ArduinoCore-mbed mbed_rp2040, mbed_nano, mbed_portenta core v3.3.0+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) **Portenta_H7, RP2040-based boards, such as Nano_RP2040_Connect, RASPBERRY_PI_PICO**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest) -12. [`Earle Philhower's arduino-pico core v2.6.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest) +12. [`Earle Philhower's arduino-pico core v2.6.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, RASPBERRY_PI_PICO_W, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest) 13. [`Arduino Core for STM32 v2.3.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for STM32F/L/H/G/WB/MP1 boards. [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest). Use STM32 core `v2.2.0` for LAN8720 or compile error. 14. [`WiFiNINA_Generic library v1.8.14-6+`](https://github.com/khoih-prog/WiFiNINA_Generic) if for WiFiNINA. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiNINA_Generic.svg?)](https://www.ardu-badge.com/WiFiNINA_Generic). @@ -1311,6 +1317,9 @@ Just as simple as: #define USE_QN_ETHERNET false ``` +--- +--- + ### For Teensy 4.1 using QNEthernet Just as simple as: @@ -1329,6 +1338,16 @@ Just as simple as: Default is using `ESP8266/ESP32 native WiFi`. You don't need to do anything special. +--- + +### To use RP2040W built-in WiFi + +```cpp +#define WEBSOCKETS_USE_RP2040W true +#define USE_RP2040W_WIFI true +#define USE_WIFI_NINA false +``` + --- --- @@ -1529,6 +1548,15 @@ Default is using `ESP8266/ESP32 native WiFi`. You don't need to do anything spec 6. [ESP32_Ethernet_ServerAllFunctionsDemo](examples/Generic/Ethernet/ESP32/ESP32_Ethernet_ServerAllFunctionsDemo) 7. [ESP32_Ethernet_AdvancedWebServer](examples/Generic/Ethernet/ESP32/ESP32_Ethernet_AdvancedWebServer). +#### For RP2040W boards using built-in WiFi. New in v1.13.0 + +1. [RP2040W-AdvancedWebServer](examples/Generic/RP2040W/RP2040W-AdvancedWebServer) +2. [RP2040W-Client](examples/Generic/RP2040W/RP2040W-Client) +3. [RP2040W-Client_SINRIC](examples/Generic/RP2040W/RP2040W-Client_SINRIC) +4. [RP2040W-Minimal-Client](examples/Generic/RP2040W/RP2040W-Minimal-Client) +5. [RP2040W-RepeatingClient](examples/Generic/RP2040W/RP2040W-RepeatingClient) +6. [RP2040W-Server](examples/Generic/Generic/RP2040W/RP2040W-Server) +7. [RP2040W_ServerAllFunctionsDemo](examples/Generic/RP2040W/RP2040W_ServerAllFunctionsDemo) --- --- @@ -1555,7 +1583,7 @@ This is the terminal output when running [SAMD-Client_SINRIC](examples/Generic/W ``` Starting WebSockets2_Generic SAMD-Client_SINRIC with WiFiNINA on SAMD NANO_33_IOT -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 WiFi-begin: return1 = 3 WiFi-begin: return2 = 3 Connected to Wifi, Connecting to WebSockets Server @iot.sinric.com @@ -1698,7 +1726,7 @@ This is terminal debug output when running [SAMD-Ethernet-Client_SINRIC](example ``` Starting WebSockets2_Generic SAMD-Ethernet-Client_SINRIC on SAMD ADAFRUIT_ITSYBITSY_M4_EXPRESS Ethernet using ENC28J60 and UIPEthernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ENC28J60_CONTROL_CS =16 SS =16 SPI_MOSI =25 @@ -1747,7 +1775,7 @@ This is terminal debug output when running [SAMDUE-Ethernet-Server](examples/Gen ``` Starting WebSockets2_Generic SAMDUE-Ethernet-Server on SAM DUE Ethernet using W5x00 and Ethernet_Generic Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_ETHERNET_GENERIC =========== [WS] Default SPI pinout: [WS] MOSI: 75 @@ -1795,7 +1823,7 @@ This is terminal debug output when running [nRF52-Ethernet-Server](examples/Gene ``` Starting WebSockets2_Generic nRF52-Ethernet-Server on NRF52840_ITSYBITSY_EXPRESS Ethernet using ENC28J60 and UIPEthernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ENC28J60_CONTROL_CS =10 SS =5 SPI_MOSI =24 @@ -1833,7 +1861,7 @@ This is terminal debug output when running [STM32-Ethernet-Client_SINRIC](exampl ``` Starting WebSockets2_Generic STM32-Ethernet-Client_SINRIC on NUCLEO_F767ZI Ethernet using LAN8742A and STM32Ethernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_LAN8742A_ETHERNET =========== WebSockets Client IP address: 192.168.2.135 Connecting to WebSockets Server @iot.sinric.com @@ -1881,7 +1909,7 @@ This is the terminal debug output when running [SAMDUE-Ethernet_ServerAllFunctio ``` Start Generic_WebSocketServerAllFunctionsDemo_W5500 -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_ETHERNET_GENERIC =========== [WS] Default SPI pinout: [WS] MOSI: 75 @@ -1957,7 +1985,7 @@ This is terminal debug output when running [STM32-Ethernet-Client_SINRIC_LAN8720 ``` Starting STM32-Ethernet-Client_SINRIC_LAN8720 on BLACK_F407VE Ethernet using LAN8720 and STM32Ethernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_LAN8720_ETHERNET =========== WebSockets Client IP address: 192.168.2.160 Connecting to WebSockets Server @iot.sinric.com @@ -2001,7 +2029,7 @@ This is terminal debug output when running [ESP32-Client_SINRIC](examples/ESP32/ ``` Starting ESP32-Client_SINRIC on ESP32S2_DEV -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ....Connected to Wifi, Connecting to WebSockets Server @iot.sinric.com [WS] WebsocketsClient::generateHandshake: base64Authorization = YXBpa2V5OjkxMjdkNDc4LTExNjAtNDE4OC04MDQ4LTQ3OWJhNWM2OTExNA== [WS] WebsocketsClient::generateHandshake: handshake = GET / HTTP/1.1 @@ -2045,7 +2073,7 @@ This is terminal debug output when running [Secured-ESP32-Client](examples/ESP32 ``` Starting WebSockets Secured-ESP32-Client on ESP32S2_DEV -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 .... Connected to Wifi, Connecting to WebSockets Server @wss://echo.websocket.org/ [WS] WebsocketsClient::doestStartsWith: str = wss://echo.websocket.org/ @@ -2105,7 +2133,7 @@ This is terminal debug output when running [InSecured-ESP32-Client](examples/ESP ``` Starting WebSockets InSecured-ESP32-Client on ESP32_DEV -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ... Connected to Wifi, Connecting to WebSockets Server @wss://echo.websocket.org/ [WS] WebsocketsClient::doestStartsWith: str = wss://echo.websocket.org/ @@ -2166,7 +2194,7 @@ This is terminal debug output when running [ESP8266-Client_SINRIC](examples/ESP3 ``` Starting ESP8266-Client_SINRIC on ESP8266_NODEMCU_ESP12E -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ......Connected to Wifi, Connecting to WebSockets Server @iot.sinric.com [WS] WebsocketsClient::generateHandshake: base64Authorization = YXBpa2V5OjkxMjdkNDc4LTExNjAtNDE4OC04MDQ4LTQ3OWJhNWM2OTExNA== [WS] WebsocketsClient::generateHandshake: handshake = GET / HTTP/1.1 @@ -2208,7 +2236,7 @@ This is terminal debug output when running [RP2040-Ethernet-Client_SINRIC](examp ``` Starting RP2040-Ethernet-Client_SINRIC on RASPBERRY_PI_PICO Ethernet using W5x00 and Ethernet_Generic Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_ETHERNET_GENERIC =========== [WS] Default SPI pinout: [WS] MOSI: 19 @@ -2278,7 +2306,7 @@ This is terminal debug output when running [RP2040-Ethernet-Client_SINRIC](examp ``` Starting RP2040-Ethernet-Client_SINRIC on RaspberryPi Pico Ethernet using W5x00 and Ethernet_Generic Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] =========== USE_ETHERNET_GENERIC =========== [WS] Default SPI pinout: [WS] MOSI: 19 @@ -2348,7 +2376,7 @@ This is terminal debug output when running [WT32_ETH01_Client_SINRIC](examples/W ``` Starting WT32_ETH01_Client_SINRIC on ESP32_DEV with ETH_PHY_LAN8720 WebServer_WT32_ETH01 v1.4.1 -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps Connected. Connecting to WebSockets Server @iot.sinric.com [WS] WebsocketsClient::generateHandshake: base64Authorization = YXBpa2V5OjkxMjdkNDc4LTExNjAtNDE4OC04MDQ4LTQ3OWJhNWM2OTExNA== @@ -2394,7 +2422,7 @@ This is terminal debug output when running [WT32_ETH01_SecuredClient](examples/W ``` Starting WT32_ETH01_SecuredClient on ESP32_DEV with ETH_PHY_LAN8720 WebServer_WT32_ETH01 v1.4.1 -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps Connected. Connecting to WebSockets Server @wss://echo.websocket.org/ [WS] WebsocketsClient::doestStartsWith: str = wss://echo.websocket.org/ @@ -2453,7 +2481,7 @@ This is terminal debug output when running [WT32_ETH01_AdvancedWebServer](exampl ``` Starting WT32_ETH01_AdvancedWebServer on ESP32_DEV with ETH_PHY_LAN8720 WebServer_WT32_ETH01 v1.4.1 -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.95, FULL_DUPLEX, 100Mbps MDNS responder started WebSockets Server Running and Ready on WT32-ETH01 @@ -2492,7 +2520,7 @@ This is terminal debug output and screenshot when running [SocketAndHttp_Teensy4 ``` Start SocketAndHttp_Teensy41_Server on TEENSY 4.1 using QNEthernet -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 =========== USE_QN_ETHERNET =========== Initialize Ethernet using DHCP => Connected! IP address:192.168.2.119 Visit http://192.168.2.119 in the browser to connect. @@ -2533,7 +2561,7 @@ This is terminal debug output when running [MultiClients_Teensy41_Server](exampl ``` Starting MultiClients_Teensy41_Server on TEENSY 4.1 using QNEthernet -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 =========== USE_QN_ETHERNET =========== Initialize Ethernet using DHCP => Connected! IP address:192.168.2.119 Server available at ws://192.168.2.119:81 @@ -2565,7 +2593,7 @@ Got Message: Hello to Server from ESP32 ``` Starting ESP32-RepeatingClient on ESP32_DEV -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 ....Connected to Wifi, Connecting to WebSockets Server @192.168.2.119 [WS] WebsocketsClient::generateHandshake: base64Authorization = [WS] WebsocketsClient::generateHandshake: handshake = GET / HTTP/1.1 @@ -2607,7 +2635,7 @@ This is terminal debug output when running [Portenta_H7_Ethernet_Server](example ``` Starting Portenta_H7_Ethernet_Server on PORTENTA_H7_M7 Ethernet using Portenta_Ethernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 WebSockets Client @ IP address: 192.168.2.132 Server available at ws://192.168.2.132:8080 [WS] WebsocketsServer::recvHandshakeRequest: value = 192.168.2.132 @@ -2643,7 +2671,7 @@ This is terminal debug output when running [Portenta_H7-Client_SINRIC](examples/ ``` Starting Portenta_H7-Client_SINRIC using WiFi on PORTENTA_H7_M7 -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 Connecting to SSID: HueNet1 Connected to Wifi, IP address: 192.168.2.130 Connecting to WebSockets Server @iot.sinric.com @@ -2691,7 +2719,7 @@ This is terminal debug output when running [Portenta_H7-Client_SINRIC](examples/ ``` Starting RP2040-AdvancedWebServer with WiFiNINA on MBED NANO_RP2040_CONNECT -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 Attempting to connect to SSID: HueNet1 Connected to Wifi, IP address: 192.168.2.96 WebSockets Server Running and Ready on MBED NANO_RP2040_CONNECT @@ -2733,7 +2761,7 @@ This is terminal debug output when running [Teensy41_Client](examples/Generic/Te ``` Starting Teensy41_Client on TEENSY 4.1 using QNEthernet -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 =========== USE_QN_ETHERNET =========== Initialize Ethernet using static IP => Connected! IP address:192.168.2.222 [WS] WebsocketsClient::doestStartsWith: str = ws://192.168.2.30:8080 @@ -2783,7 +2811,7 @@ This is terminal debug output when running [ESP32_Ethernet-Client](examples/Gene ``` Starting ESP32_Ethernet-Client on ESP32_DEV Ethernet using W5x00 and Ethernet_Generic Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] Default SPI pinout: [WS] MOSI: 23 [WS] MISO: 19 @@ -2848,7 +2876,7 @@ This is terminal debug output when running [ESP32_Ethernet-Client](examples/Gene ``` Starting ESP32_Ethernet-Client on ESP32_DEV Ethernet using ENC28J60 and EthernetENC Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] Default SPI pinout: [WS] MOSI: 23 [WS] MISO: 19 @@ -2910,7 +2938,7 @@ This is terminal debug output when running [ESP32_Ethernet-Client](examples/Gene ``` Starting ESP32_Ethernet-Client on ESP32_DEV Ethernet using ENC28J60 and UIPEthernet Library -WebSockets2_Generic v1.12.1 +WebSockets2_Generic v1.13.0 [WS] Default SPI pinout: [WS] MOSI: 23 [WS] MISO: 19 @@ -2962,6 +2990,46 @@ Got a Ping! ``` +--- + +#### 25. [RP2040W-Client](examples/Generic/RP2040W/RP2040W-Client) using built-in WiFi on RASPBERRY_PI_PICO_W + +This is terminal debug output when running [RP2040W-Client](examples/Generic/RP2040W/RP2040W-Client) on **RASPBERRY_PI_PICO_W** using built-in `CYW43439 WiFi` + + +``` +Starting RP2040W-Client on RASPBERRY_PI_PICO_W +WebSockets2_Generic v1.13.0 +Connecting to SSID: HueNet1 +SSID: HueNet1 +Local IP Address: 192.168.2.77 +Connecting to WebSockets Server @192.168.2.30 +[WS] WebsocketsClient::generateHandshake: base64Authorization = +[WS] WebsocketsClient::generateHandshake: handshake = GET / HTTP/1.1 +Host: 192.168.2.30 +Sec-WebSocket-Key: MDEyMzQ1Njc4OWFiY2RlZg== +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Version: 13 +User-Agent: TinyWebsockets Client +Authorization: Basic +Origin: https://github.com/khoih-prog/Websockets2_Generic +[WS] WebsocketsClient::connect: base64Authorization = +[WS] WebsocketsClient::generateHandshake: key = Upgrade +[WS] WebsocketsClient::generateHandshake: value = websocket +[WS] WebsocketsClient::generateHandshake: key = Connection +[WS] WebsocketsClient::generateHandshake: value = Upgrade +[WS] WebsocketsClient::generateHandshake: key = Sec-WebSocket-Accept +[WS] WebsocketsClient::generateHandshake: value = BACScCJPNqyz+UBoqMH89VmURoA= +[WS] WebsocketsClient::generateHandshake: key = Origin +[WS] WebsocketsClient::generateHandshake: value = https://github.com/khoih-prog/Websockets2_Generic +Connnection Opened +Connected! +Got Message: Hello to Server from RASPBERRY_PI_PICO_W +Got a Ping! +Got a Ping! +``` + --- --- @@ -3003,6 +3071,12 @@ Got a Ping!

+7. This is the screenshot when running [RP2040W-AdvancedWebServer](examples/Generic/RP2040W/RP2040W-AdvancedWebServer) on **RASPBERRY_PI_PICO_W** using built-in WiFi, to demonstrate the new non-blocking feature of WebSockets Server enabling WebServer and WebSockets Server to run concurrently. + +

+ +

+ --- --- @@ -3038,7 +3112,7 @@ Submit issues to: [WebSockets2_Generic issues](https://github.com/khoih-prog/Web ### TO DO - 1. Support more boards (RP2040W, etc.) + 1. Support more boards 2. Support ESP8266/ESP32-AT shields. 3. Add SSL client support to Teensy, SAMD21/SAMD51 and nRF52 using WiFiNINA. 4. Support more non-compatible Ethernet Libraries such as Ethernet_Shield_W5200, EtherCard, EtherSia @@ -3090,6 +3164,9 @@ Submit issues to: [WebSockets2_Generic issues](https://github.com/khoih-prog/Web 36. Use new `waitForLink()` function of QNEthernet 37. Add support to `ESP32` using either `W5x00` or `ENC28J60` Ethernet 38. Add support to ENC28J60 using `EthernetENC` or `UIPEthernet` Library for these supported boards: **ESP32, nRF52, RP2040, SAM DUE, SAMD, STM32, Teensy** +39. Add support to `RP2040W` using `CYW43439 WiFi` or `Ethernet` with `arduino-pico` core + + --- --- diff --git a/changelog.md b/changelog.md index b9aeed06..264f6e1a 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ ## Table of Contents * [Changelog](#changelog) + * [Release v1.13.0](#release-v1130) * [Release v1.12.1](#release-v1121) * [Release v1.12.0](#release-v1120) * [Release v1.11.0](#release-v1110) @@ -48,6 +49,10 @@ ## Changelog +### Release v1.13.0 + +1. Add support to `RP2040W` using `CYW43439 WiFi` or `Ethernet` with `arduino-pico` core + ### Release v1.12.1 1. Improve and fix bug in examples diff --git a/library.json b/library.json index ea1bedaa..96ecfa96 100644 --- a/library.json +++ b/library.json @@ -1,8 +1,8 @@ { "name": "WebSockets2_Generic", - "version": "1.12.1", - "description": "WebSocket Server and Client for Arduino based on RFC6455, originally designed for ESP8266/ESP32. Now supports ESP8266, ESP32 (including ESP32-C3; ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, Portenta_H7, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00/ENC28J60/LAN8742A/LAN8720, ESP8266/ESP32-AT modules/shields, Portenta_H7 WiFi/Ethernet, as well as SINRIC / Alexa / Google Home. With updated SSL CA Certs, Fingerprint and InSecure mode. Now supporting ENC28J60 using either UIPEthernet or EthernetENC library and ESP32 using Ethernet", - "keywords": "communication, wifinina, wt32-eth01, websocket, webserver, Sinric, Alexa, ethernet, QNEthernet, NativeEthernet, lan8742a, lan8720, esp32, esp8266, stm32, samd, nrf52, rp2040, ssl, Portenta-H7, wifi, wifi101, sam-due, rpi-pico, W5x00, W5500, ENC28J60", + "version": "1.13.0", + "description": "WebSocket Server and Client for Arduino based on RFC6455, originally designed for ESP8266/ESP32. Now supports ESP8266, ESP32 (including ESP32-C3; ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, Portenta_H7, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00/ENC28J60/LAN8742A/LAN8720, ESP8266/ESP32-AT modules/shields, Portenta_H7 WiFi/Ethernet, as well as SINRIC / Alexa / Google Home. With updated SSL CA Certs, Fingerprint and InSecure mode. Now supporting ENC28J60 using either UIPEthernet or EthernetENC library, ESP32 using Ethernet and RP2-4-W using CYW43439 WiFi", + "keywords": "communication, wifinina, wt32-eth01, websocket, webserver, Sinric, Alexa, ethernet, QNEthernet, NativeEthernet, lan8742a, lan8720, esp32, esp8266, stm32, samd, nrf52, rp2040, ssl, Portenta-H7, wifi, wifi101, sam-due, rpi-pico, W5x00, W5500, ENC28J60, rp2040w, pico-w", "authors": [ { "name": "Gil Maimon", diff --git a/library.properties b/library.properties index d37c7320..c474f28a 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=WebSockets2_Generic -version=1.12.1 +version=1.13.0 author=Gil Maimon , Khoi Hoang maintainer=Khoi Hoang sentence=A WebSocket Server and Client library for Arduino, based on RFC6455, for writing modern Websockets applications. -paragraph=Featuring modern callbacks (supports lambdas) and a minimal interface. Contains a websockets Client and Server. Supports all features of the RFC6455 (pings, pongs, binary and text data, error codes) and WSS (Websockets over SSL). Now support ESP8266, ESP32 (including ESP32-C3; ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, Portenta_H7, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00/ENC28J60/LAN8742A/LAN8720, ESP8266/ESP32-AT modules/shields, Portenta_H7 WiFi/Ethernet, as well as SINRIC / Alexa / Google Home. With updated SSL CA Certs, Fingerprint and InSecure mode. Now supporting ENC28J60 using either UIPEthernet or EthernetENC library and ESP32 using Ethernet +paragraph=Featuring modern callbacks (supports lambdas) and a minimal interface. Contains a websockets Client and Server. Supports all features of the RFC6455 (pings, pongs, binary and text data, error codes) and WSS (Websockets over SSL). Now support ESP8266, ESP32 (including ESP32-C3; ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, Portenta_H7, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00/ENC28J60/LAN8742A/LAN8720, ESP8266/ESP32-AT modules/shields, Portenta_H7 WiFi/Ethernet, as well as SINRIC / Alexa / Google Home. With updated SSL CA Certs, Fingerprint and InSecure mode. Now supporting ENC28J60 using either UIPEthernet or EthernetENC library, ESP32 using Ethernet and RP2-4-W using CYW43439 WiFi category=Communication url=https://github.com/khoih-prog/WebSockets2_Generic license=GPLv3 diff --git a/src/Tiny_Websockets_Generic/client.hpp b/src/Tiny_Websockets_Generic/client.hpp index a1800e9f..7b4b664d 100644 --- a/src/Tiny_Websockets_Generic/client.hpp +++ b/src/Tiny_Websockets_Generic/client.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _CLIENT_HPP_ @@ -32,6 +33,8 @@ #pragma once +///////////////////////////////////////////////////// + #include #include #include @@ -40,7 +43,8 @@ #include #include -// KH, from v1.0.1 +///////////////////////////////////////////////////// + #if (WEBSOCKETS_USE_ETHERNET || WEBSOCKETS_USE_PORTENTA_H7_ETHERNET) #if USE_UIP_ETHERNET // KH, from v1.0.2 @@ -74,22 +78,39 @@ #warning WEBSOCKETS_USE_ETHERNET in client.hpp #include #endif + +///////////////////////////////////////////////////// + +#elif WEBSOCKETS_USE_RP2040W + #warning WEBSOCKETS_USE_RP2040W in client.hpp + #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFININA #warning WEBSOCKETS_USE_WIFININA in client.hpp #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFI101 #warning WEBSOCKETS_USE_WIFI101 in client.hpp - #include + #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_PORTENTA_H7_WIFI #warning WEBSOCKETS_USE_PORTENTA_H7_WIFI in client.hpp #include + +///////////////////////////////////////////////////// + #else #warning WEBSOCKETS_USE_ESP_WIFI in client.hpp #include #endif -////// - +///////////////////////////////////////////////////// namespace websockets2_generic { @@ -99,6 +120,8 @@ namespace websockets2_generic ConnectionClosed, GotPing, GotPong }; + + ///////////////////////////////////////////////////// class WebsocketsClient; typedef std::function MessageCallback; @@ -106,7 +129,9 @@ namespace websockets2_generic typedef std::function EventCallback; typedef std::function PartialEventCallback; - + + ///////////////////////////////////////////////////// + class WebsocketsClient { public: @@ -150,9 +175,7 @@ namespace websockets2_generic void setFragmentsPolicy(const FragmentsPolicy newPolicy); FragmentsPolicy getFragmentsPolicy() const; - // KH add in v1.0.6 WebsocketsMessage readNonBlocking(); - ////// WebsocketsMessage readBlocking(); @@ -161,13 +184,18 @@ namespace websockets2_generic void close(const CloseReason reason = CloseReason_NormalClosure); CloseReason getCloseReason() const; - + + ///////////////////////////////////////////////////// + void setUseMasking(bool useMasking) { _endpoint.setUseMasking(useMasking); } - + + ///////////////////////////////////////////////////// + void setInsecure(); + #ifdef ESP8266 void setFingerprint(const char* fingerprint); void setClientRSACert(const X509List *cert, const PrivateKey *sk); @@ -184,15 +212,12 @@ namespace websockets2_generic virtual ~WebsocketsClient(); - // KH add void setAuthorization(const char * user, const char * password); WSString getAuthorization(void); - ////// private: - // KH add + WSString base64Authorization; ///< Base64 encoded Auth request - ////// std::shared_ptr _client; std::vector> _customHeaders; @@ -200,27 +225,31 @@ namespace websockets2_generic bool _connectionOpen; MessageCallback _messagesCallback; EventCallback _eventsCallback; + + ///////////////////////////////////////////////////// + enum SendMode { SendMode_Normal, SendMode_Streaming - } _sendMode; - - + } _sendMode; + + ///////////////////////////////////////////////////// + #ifdef ESP8266 const char* _optional_ssl_fingerprint = nullptr; const X509List* _optional_ssl_trust_anchors = nullptr; // KH, New in v1.0.5 (sync with v0.4.18) - const PublicKey* _optional_ssl_known_key = nullptr; - const X509List* _optional_ssl_rsa_cert = nullptr; + const PublicKey* _optional_ssl_known_key = nullptr; + const X509List* _optional_ssl_rsa_cert = nullptr; const PrivateKey* _optional_ssl_rsa_private_key = nullptr; - const X509List* _optional_ssl_ec_cert = nullptr; - const PrivateKey* _optional_ssl_ec_private_key = nullptr; + const X509List* _optional_ssl_ec_cert = nullptr; + const PrivateKey* _optional_ssl_ec_private_key = nullptr; ////// #elif defined(ESP32) - const char* _optional_ssl_ca_cert = nullptr; - const char* _optional_ssl_client_ca = nullptr; + const char* _optional_ssl_ca_cert = nullptr; + const char* _optional_ssl_client_ca = nullptr; const char* _optional_ssl_private_key = nullptr; #endif @@ -230,6 +259,9 @@ namespace websockets2_generic void upgradeToSecuredConnection(); }; + + ///////////////////////////////////////////////////// + } // namespace websockets2_generic #endif // _CLIENT_HPP_ diff --git a/src/Tiny_Websockets_Generic/internals/data_frame.hpp b/src/Tiny_Websockets_Generic/internals/data_frame.hpp index 22bec6ec..5fa8cd11 100644 --- a/src/Tiny_Websockets_Generic/internals/data_frame.hpp +++ b/src/Tiny_Websockets_Generic/internals/data_frame.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/websockets_endpoint.hpp b/src/Tiny_Websockets_Generic/internals/websockets_endpoint.hpp index 59926f0b..dad98511 100644 --- a/src/Tiny_Websockets_Generic/internals/websockets_endpoint.hpp +++ b/src/Tiny_Websockets_Generic/internals/websockets_endpoint.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common.hpp b/src/Tiny_Websockets_Generic/internals/ws_common.hpp index cd8f114e..1ac4540f 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_EthernetENC.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_EthernetENC.hpp index 020023fa..6b252059 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_EthernetENC.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_EthernetENC.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_Portenta_H7.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_Portenta_H7.hpp index 11f28da1..f6bb4b71 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_Portenta_H7.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_Portenta_H7.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_W5x00.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_W5x00.hpp index f29f518b..66fa1b1c 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_W5x00.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_Ethernet_W5x00.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once @@ -33,6 +34,8 @@ #include #include +///////////////////////////////////////////////////// + namespace websockets2_generic { typedef std::string WSString; @@ -47,6 +50,8 @@ namespace websockets2_generic } // namespace internals2_generic } // namespace websockets 2_generic +///////////////////////////////////////////////////// + #if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ @@ -67,6 +72,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #elif ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ @@ -86,6 +93,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #elif ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) @@ -104,6 +113,8 @@ namespace websockets2_generic #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL +///////////////////////////////////////////////////// + #elif ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ defined(STM32WB) || defined(STM32MP1) ) @@ -122,6 +133,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #elif ( defined(CORE_TEENSY) || defined(__IMXRT1062__) || defined(ARDUINO_TEENSY41) || defined(ARDUINO_TEENSY40) || \ defined(__MK66FX1M0__) || defined(__MK64FX512__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || \ @@ -142,6 +155,8 @@ namespace websockets2_generic #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL +///////////////////////////////////////////////////// + #elif ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \ defined(ARDUINO_GENERIC_RP2040) ) // Using Ethernet W5x00 @@ -159,6 +174,8 @@ namespace websockets2_generic #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL +///////////////////////////////////////////////////// + #elif ( defined(ESP32) ) // Using Ethernet W5x00 #warning Using Ethernet W5x00 for ESP32 in ws_common_Ethernet_W5x00.hpp @@ -174,5 +191,7 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEthernetTcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #endif diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_LAN8742AEthernet.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_LAN8742AEthernet.hpp index 01c9f9cf..69ee6908 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_LAN8742AEthernet.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_LAN8742AEthernet.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_NativeEthernet.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_NativeEthernet.hpp index 4237b65f..21648e37 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_NativeEthernet.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_NativeEthernet.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_QNEthernet.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_QNEthernet.hpp index de98acf0..a58f0287 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_QNEthernet.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_QNEthernet.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_RP2040W.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_RP2040W.hpp new file mode 100644 index 00000000..5ec8de84 --- /dev/null +++ b/src/Tiny_Websockets_Generic/internals/ws_common_RP2040W.hpp @@ -0,0 +1,76 @@ +/**************************************************************************************************************************** + ws_common_RP2040W.hpp + For WebSockets2_Generic Library + + Based on and modified from Gil Maimon's ArduinoWebsockets library https://github.com/gilmaimon/ArduinoWebsockets + to support STM32F/L/H/G/WB/MP1, nRF52, SAMD21/SAMD51, SAM DUE, Teensy, RP2040 boards besides ESP8266 and ESP32 + + The library provides simple and easy interface for websockets (Client and Server). + + Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic + Licensed under MIT license + + Version: 1.13.0 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support + ... + 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples + 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface + 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 + 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency + 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet + 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 + 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet + 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi + *****************************************************************************************************************************/ + +#pragma once + +#include +#include +#include + +///////////////////////////////////////////////////// + +namespace websockets2_generic +{ + typedef std::string WSString; + typedef String WSInterfaceString; + + namespace internals2_generic + { + WSString fromInterfaceString(const WSInterfaceString& str); + WSString fromInterfaceString(const WSInterfaceString&& str); + WSInterfaceString fromInternalString(const WSString& str); + WSInterfaceString fromInternalString(const WSString&& str); + } // namespace internals2_generic +} // namespace websockets 2_generic + +#if WEBSOCKETS_USE_RP2040W + #warning Using RP2040W CYC43439 WIFI in ws_common_RP2040W.hpp +#endif + +///////////////////////////////////////////////////// + +#if ( defined(ARDUINO_RASPBERRY_PI_PICO_W) && USE_RP2040W_WIFI ) + + // Using RP2040W CYC43439 WIFI + #warning Using CYC43439 WIFI for RP2040W in ws_common_RP2040W.hpp + + #define PLATFORM_DOES_NOT_SUPPORT_BLOCKING_READ + #define _WS_CONFIG_NO_SSL true + + #include + #define WSDefaultTcpClient websockets2_generic::network2_generic::RP2040W_TcpClient + #define WSDefaultTcpServer websockets2_generic::network2_generic::RP2040W_TcpServer + + #if (defined(_WS_CONFIG_NO_SSL) && !_WS_CONFIG_NO_SSL) + // OpenSSL Dependent + #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::Secured_RP2040W_TcpClient + #endif //_WS_CONFIG_NO_SSL + +#endif diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_UIPEthernet.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_UIPEthernet.hpp index 0c9ee62b..831a9ae2 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_UIPEthernet.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_UIPEthernet.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_WiFi101.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_WiFi101.hpp index 8d727dd7..87a9e30e 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_WiFi101.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_WiFi101.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_WiFiNINA.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_WiFiNINA.hpp index 6e5801f0..c1d69bd6 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_WiFiNINA.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_WiFiNINA.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once @@ -33,6 +34,8 @@ #include #include +///////////////////////////////////////////////////// + namespace websockets2_generic { typedef std::string WSString; @@ -47,18 +50,20 @@ namespace websockets2_generic } // namespace internals2_generic } // namespace websockets 2_generic +///////////////////////////////////////////////////// + #if WEBSOCKETS_USE_WIFININA #warning Using WIFININA in ws_common_WIFININA.hpp #endif +///////////////////////////////////////////////////// #if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) - - + // Using WiFiNINA #warning Using WiFiNINA for SAMD in ws_common_WIFININA.hpp @@ -72,7 +77,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredWiFiNINATcpClient #endif //_WS_CONFIG_NO_SSL - + +///////////////////////////////////////////////////// #elif ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ @@ -91,7 +97,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredWiFiNINATcpClient #endif //_WS_CONFIG_NO_SSL - + +///////////////////////////////////////////////////// #elif ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) // From v1.0.1 @@ -109,11 +116,12 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredWiFiNINATcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #elif ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ defined(STM32WB) || defined(STM32MP1) ) - // From v1.0.4 // Using WiFiNINA #warning Using WiFiNINA for STM32F/L/H/G/WB/MP1 in ws_common_WIFININA.hpp @@ -128,6 +136,8 @@ namespace websockets2_generic // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredWiFiNINATcpClient #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// #elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) @@ -144,5 +154,8 @@ namespace websockets2_generic #ifndef _WS_CONFIG_NO_SSL // OpenSSL Dependent #define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredWiFiNINATcpClient - #endif //_WS_CONFIG_NO_SSL + #endif //_WS_CONFIG_NO_SSL + +///////////////////////////////////////////////////// + #endif diff --git a/src/Tiny_Websockets_Generic/internals/ws_common_WiFi_Portenta_H7.hpp b/src/Tiny_Websockets_Generic/internals/ws_common_WiFi_Portenta_H7.hpp index be3e0d27..12a08bda 100644 --- a/src/Tiny_Websockets_Generic/internals/ws_common_WiFi_Portenta_H7.hpp +++ b/src/Tiny_Websockets_Generic/internals/ws_common_WiFi_Portenta_H7.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/wscrypto/crypto.hpp b/src/Tiny_Websockets_Generic/internals/wscrypto/crypto.hpp index 312bd021..c99c9c91 100644 --- a/src/Tiny_Websockets_Generic/internals/wscrypto/crypto.hpp +++ b/src/Tiny_Websockets_Generic/internals/wscrypto/crypto.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/internals/wscrypto/sha1.hpp b/src/Tiny_Websockets_Generic/internals/wscrypto/sha1.hpp index a48517db..400c770e 100644 --- a/src/Tiny_Websockets_Generic/internals/wscrypto/sha1.hpp +++ b/src/Tiny_Websockets_Generic/internals/wscrypto/sha1.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/message.hpp b/src/Tiny_Websockets_Generic/message.hpp index b0976212..90682786 100644 --- a/src/Tiny_Websockets_Generic/message.hpp +++ b/src/Tiny_Websockets_Generic/message.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _MESSAGE_HPP_ @@ -34,7 +35,8 @@ #include -// KH, from v1.0.1 +///////////////////////////////////////////////////// + #if (WEBSOCKETS_USE_ETHERNET || WEBSOCKETS_USE_PORTENTA_H7_ETHERNET) #if USE_UIP_ETHERNET // KH, from v1.0.2 @@ -68,44 +70,85 @@ #warning WEBSOCKETS_USE_ETHERNET in message.hpp #include #endif + +///////////////////////////////////////////////////// + +#elif WEBSOCKETS_USE_RP2040W + #warning WEBSOCKETS_USE_RP2040W in message.hpp + #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFININA #warning WEBSOCKETS_USE_WIFININA in message.hpp #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFI101 #warning WEBSOCKETS_USE_WIFI101 in message.hpp #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_PORTENTA_H7_WIFI #warning WEBSOCKETS_USE_PORTENTA_H7_WIFI in client.hpp - #include + #include + +///////////////////////////////////////////////////// + #else #warning WEBSOCKETS_USE_ESP_WIFI in message.hpp #include #endif -////// + +///////////////////////////////////////////////////// namespace websockets2_generic { enum class MessageType { Empty, - Text, Binary, - Ping, Pong, Close + Text, + Binary, + Ping, + Pong, + Close }; + + ///////////////////////////////////////////////////// MessageType messageTypeFromOpcode(uint8_t opcode); + + ///////////////////////////////////////////////////// enum class MessageRole { - Complete, First, Continuation, Last + Complete, + First, + Continuation, + Last }; + + ///////////////////////////////////////////////////// // The class the user will interact with as a message // This message can be partial (so practically this is a Frame and not a message) struct WebsocketsMessage { - WebsocketsMessage(MessageType msgType, const WSString& msgData, MessageRole msgRole = MessageRole::Complete) : _type(msgType), _length(msgData.size()), _data(msgData), _role(msgRole) {} + WebsocketsMessage(MessageType msgType, const WSString& msgData, MessageRole msgRole = MessageRole::Complete) : + _type(msgType), + _length(msgData.size()), + _data(msgData), + _role(msgRole) + {} + + ///////////////////////////////////////////////////// + WebsocketsMessage() : WebsocketsMessage(MessageType::Empty, "", MessageRole::Complete) {} + ///////////////////////////////////////////////////// + static WebsocketsMessage CreateFromFrame(internals2_generic::WebsocketsFrame frame, MessageType overrideType = MessageType::Empty) { auto type = overrideType; @@ -137,99 +180,138 @@ namespace websockets2_generic return WebsocketsMessage(type, std::move(frame.payload), msgRole); } + ///////////////////////////////////////////////////// + // for validation bool isEmpty() const { return this->_type == MessageType::Empty; } + ///////////////////////////////////////////////////// + // Type Helper Functions MessageType type() const { return this->_type; } + ///////////////////////////////////////////////////// + bool isText() const { return this->_type == MessageType::Text; } + + ///////////////////////////////////////////////////// bool isBinary() const { return this->_type == MessageType::Binary; } + ///////////////////////////////////////////////////// + bool isPing() const { return this->_type == MessageType::Ping; } + + ///////////////////////////////////////////////////// bool isPong() const { return this->_type == MessageType::Pong; } + ///////////////////////////////////////////////////// + bool isClose() const { return this->_type == MessageType::Close; } + ///////////////////////////////////////////////////// + // Role Helper Function MessageRole role() const { return this->_role; } + ///////////////////////////////////////////////////// + bool isComplete() const { return this->_role == MessageRole::Complete; } + + ///////////////////////////////////////////////////// bool isPartial() const { return this->_role != MessageRole::Complete; } + + ///////////////////////////////////////////////////// bool isFirst() const { return this->_role == MessageRole::First; } + + ///////////////////////////////////////////////////// bool isContinuation() const { return this->_role == MessageRole::Continuation; } + + ///////////////////////////////////////////////////// bool isLast() const { return this->_role == MessageRole::Last; } + ///////////////////////////////////////////////////// + WSInterfaceString data() const { return internals2_generic::fromInternalString(this->_data); } + + ///////////////////////////////////////////////////// const WSString& rawData() const { return this->_data; } + + ///////////////////////////////////////////////////// const char* c_str() const { return this->_data.c_str(); } + ///////////////////////////////////////////////////// + uint32_t length() const { return this->_length; } + ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + class StreamBuilder { public: StreamBuilder(bool dummyMode = false) : _dummyMode(dummyMode), _empty(true) {} + ///////////////////////////////////////////////////// + void first(const internals2_generic::WebsocketsFrame& frame) { if (this->_empty == false) @@ -263,6 +345,8 @@ namespace websockets2_generic } } + ///////////////////////////////////////////////////// + void append(const internals2_generic::WebsocketsFrame& frame) { if (isErrored()) @@ -287,6 +371,8 @@ namespace websockets2_generic } } + ///////////////////////////////////////////////////// + void end(const internals2_generic::WebsocketsFrame& frame) { if (isErrored()) @@ -319,31 +405,43 @@ namespace websockets2_generic this->_isComplete = false; } + ///////////////////////////////////////////////////// + bool isErrored() { return this->_didErrored; } + ///////////////////////////////////////////////////// + bool isOk() { return !this->_didErrored; } + ///////////////////////////////////////////////////// + bool isComplete() { return this->_isComplete; } + ///////////////////////////////////////////////////// + bool isEmpty() { return this->_empty; } + ///////////////////////////////////////////////////// + MessageType type() { return this->_type; } + ///////////////////////////////////////////////////// + WebsocketsMessage build() { return WebsocketsMessage( @@ -353,6 +451,8 @@ namespace websockets2_generic ); } + ///////////////////////////////////////////////////// + private: bool _dummyMode; bool _empty; @@ -362,6 +462,9 @@ namespace websockets2_generic bool _didErrored; }; // class StreamBuilder + + ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// private: const MessageType _type; diff --git a/src/Tiny_Websockets_Generic/network/DUE_EthernetENC/DUE_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/DUE_EthernetENC/DUE_EthernetENC_tcp.hpp index 711c4626..55dc905c 100644 --- a/src/Tiny_Websockets_Generic/network/DUE_EthernetENC/DUE_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/DUE_EthernetENC/DUE_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/DUE_Ethernet_W5x00/DUE_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/DUE_Ethernet_W5x00/DUE_Ethernet_W5x00_tcp.hpp index 08a238e6..950ed434 100644 --- a/src/Tiny_Websockets_Generic/network/DUE_Ethernet_W5x00/DUE_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/DUE_Ethernet_W5x00/DUE_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/DUE_UIPEthernet/DUE_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/DUE_UIPEthernet/DUE_UIPEthernet_tcp.hpp index ff8ea32b..0d0b9d51 100644 --- a/src/Tiny_Websockets_Generic/network/DUE_UIPEthernet/DUE_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/DUE_UIPEthernet/DUE_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/ESP32_EthernetENC/ESP32_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/ESP32_EthernetENC/ESP32_EthernetENC_tcp.hpp index cc427389..aedce7b8 100644 --- a/src/Tiny_Websockets_Generic/network/ESP32_EthernetENC/ESP32_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/ESP32_EthernetENC/ESP32_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/ESP32_Ethernet_W5x00/ESP32_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/ESP32_Ethernet_W5x00/ESP32_Ethernet_W5x00_tcp.hpp index cf67f3d9..1f905a93 100644 --- a/src/Tiny_Websockets_Generic/network/ESP32_Ethernet_W5x00/ESP32_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/ESP32_Ethernet_W5x00/ESP32_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/ESP32_UIPEthernet/ESP32_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/ESP32_UIPEthernet/ESP32_UIPEthernet_tcp.hpp index b284b3a9..3846f963 100644 --- a/src/Tiny_Websockets_Generic/network/ESP32_UIPEthernet/ESP32_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/ESP32_UIPEthernet/ESP32_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Portenta_H7_Ethernet/Portenta_H7_Ethernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/Portenta_H7_Ethernet/Portenta_H7_Ethernet_tcp.hpp index a95216cc..8c236315 100644 --- a/src/Tiny_Websockets_Generic/network/Portenta_H7_Ethernet/Portenta_H7_Ethernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Portenta_H7_Ethernet/Portenta_H7_Ethernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Portenta_H7_WiFi/Portenta_H7_WiFi_tcp.hpp b/src/Tiny_Websockets_Generic/network/Portenta_H7_WiFi/Portenta_H7_WiFi_tcp.hpp index ec319eae..e75916c7 100644 --- a/src/Tiny_Websockets_Generic/network/Portenta_H7_WiFi/Portenta_H7_WiFi_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Portenta_H7_WiFi/Portenta_H7_WiFi_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once @@ -46,6 +47,8 @@ namespace websockets2_generic { typedef GenericEspTcpClient WiFiTcpClient; + ///////////////////////////////////////////////////// + class SecuredWiFiTcpClient : public GenericEspTcpClient { public: @@ -78,6 +81,7 @@ namespace websockets2_generic #endif }; + ///////////////////////////////////////////////////// #ifndef WEBSOCKETS_PORT #define DUMMY_PORT 8080 @@ -87,11 +91,15 @@ namespace websockets2_generic // KH, quick fix for WiFiNINA port #define CLOSED 0 + + ///////////////////////////////////////////////////// class WiFiTcpServer : public TcpServer { public: WiFiTcpServer() : server(DUMMY_PORT) {} + + ///////////////////////////////////////////////////// bool poll() override { @@ -102,6 +110,8 @@ namespace websockets2_generic return true; ////// } + + ///////////////////////////////////////////////////// bool listen(const uint16_t port) override { @@ -112,6 +122,8 @@ namespace websockets2_generic ////// return available(); } + + ///////////////////////////////////////////////////// TcpClient* accept() override { @@ -134,6 +146,8 @@ namespace websockets2_generic return new WiFiTcpClient; } + + ///////////////////////////////////////////////////// bool available() override { @@ -151,6 +165,8 @@ namespace websockets2_generic //return server.status() != CLOSED; return result; } + + ///////////////////////////////////////////////////// void close() override { @@ -160,17 +176,26 @@ namespace websockets2_generic //server.close(); ////// } + + ///////////////////////////////////////////////////// virtual ~WiFiTcpServer() { if (available()) close(); } + + ///////////////////////////////////////////////////// protected: + + ///////////////////////////////////////////////////// + int getSocket() const override { return -1; } + + ///////////////////////////////////////////////////// private: WiFiServer server; diff --git a/src/Tiny_Websockets_Generic/network/RP2040W/RP2040W_tcp.hpp b/src/Tiny_Websockets_Generic/network/RP2040W/RP2040W_tcp.hpp new file mode 100644 index 00000000..a123f556 --- /dev/null +++ b/src/Tiny_Websockets_Generic/network/RP2040W/RP2040W_tcp.hpp @@ -0,0 +1,194 @@ +/**************************************************************************************************************************** + RP2040W_tcp.hpp + For RP2040 boards with WiFiNINA module/shield such as Nano_RP2040_Connect + + Based on and modified from Gil Maimon's ArduinoWebsockets library https://github.com/gilmaimon/ArduinoWebsockets + to support STM32F/L/H/G/WB/MP1, nRF52, SAMD21/SAMD51, SAM DUE, Teensy, RP2040 boards besides ESP8266 and ESP32 + + The library provides simple and easy interface for websockets (Client and Server). + + Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic + Licensed under MIT license + + Version: 1.13.0 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support + ... + 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples + 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface + 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 + 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency + 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet + 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 + 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet + 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi + *****************************************************************************************************************************/ + +#pragma once + +#if ( defined(ARDUINO_RASPBERRY_PI_PICO_W) && USE_RP2040W_WIFI ) + +#include +#include +#include +#include + +#include + +namespace websockets2_generic +{ + namespace network2_generic + { + typedef GenericEspTcpClient RP2040W_TcpClient; + + ///////////////////////////////////////////////////// + +#if (defined(_WS_CONFIG_NO_SSL) && !_WS_CONFIG_NO_SSL) + // KH, no SSL support yet for RP2040W + class Secured_RP2040W_TcpClient : public GenericEspTcpClient + { + public: + void setInsecure() + { + // KH, to fix, for v1.0.0 only + //this->client.setInsecure(); + } + + void setFingerprint(const char* fingerprint) + { + (void) fingerprint; + + // KH, to fix, for testing only + //this->client.setFingerprint(fingerprint); + } +#if 0 + void setClientRSACert(const X509List *cert, const PrivateKey *sk) + { + // KH, to fix, for v1.0.0 only + //this->client.setClientRSACert(cert, sk); + } + + void setTrustAnchors(const X509List *ta) + { + // KH, to fix, for v1.0.0 only + //this->client.setTrustAnchors(ta); + } +#endif + }; +#endif + + ///////////////////////////////////////////////////// + + #ifndef WEBSOCKETS_PORT + #define DUMMY_PORT 8080 + #else + #define DUMMY_PORT WEBSOCKETS_PORT + #endif + + // KH, quick fix for WiFiNINA port + #define CLOSED 0 + + ///////////////////////////////////////////////////// + + class RP2040W_TcpServer : public TcpServer + { + public: + RP2040W_TcpServer() : server(DUMMY_PORT) {} + + ///////////////////////////////////////////////////// + + bool poll() override + { + yield(); + + // KH, to fix, for testing only + //return server.hasClient(); + return true; + ////// + } + + ///////////////////////////////////////////////////// + + bool listen(const uint16_t port) override + { + yield(); + + server.begin(port); + + return available(); + } + + ///////////////////////////////////////////////////// + + TcpClient* accept() override + { + while (available()) + { + yield(); + auto client = server.available(); + + if (client) + { + return new RP2040W_TcpClient{client}; + } + else + { + // Return NULL Client. Remember to test for NULL and process correctly + return NULL; + } + } + + return new RP2040W_TcpClient; + } + + ///////////////////////////////////////////////////// + + bool available() override + { + yield(); + + return server.status() != CLOSED; + } + + ///////////////////////////////////////////////////// + + void close() override + { + yield(); + + // KH, to fix, for testing only + //server.close(); + ////// + } + + ///////////////////////////////////////////////////// + + virtual ~RP2040W_TcpServer() + { + if (available()) + close(); + } + + ///////////////////////////////////////////////////// + + protected: + + ///////////////////////////////////////////////////// + + int getSocket() const override + { + return -1; + } + + ///////////////////////////////////////////////////// + + private: + WiFiServer server; + }; + } // namespace network2_generic +} // namespace websockets2_generic +#endif // #ifdef RP2040 diff --git a/src/Tiny_Websockets_Generic/network/RP2040_EthernetENC/RP2040_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/RP2040_EthernetENC/RP2040_EthernetENC_tcp.hpp index a79e05dc..0bb43f04 100644 --- a/src/Tiny_Websockets_Generic/network/RP2040_EthernetENC/RP2040_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/RP2040_EthernetENC/RP2040_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/RP2040_Ethernet_W5x00/RP2040_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/RP2040_Ethernet_W5x00/RP2040_Ethernet_W5x00_tcp.hpp index 3f28cbf3..1a68abc2 100644 --- a/src/Tiny_Websockets_Generic/network/RP2040_Ethernet_W5x00/RP2040_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/RP2040_Ethernet_W5x00/RP2040_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/RP2040_UIPEthernet/RP2040_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/RP2040_UIPEthernet/RP2040_UIPEthernet_tcp.hpp index bc52f970..60d526b1 100644 --- a/src/Tiny_Websockets_Generic/network/RP2040_UIPEthernet/RP2040_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/RP2040_UIPEthernet/RP2040_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/RP2040_WiFiNINA/RP2040_WiFiNINA_tcp.hpp b/src/Tiny_Websockets_Generic/network/RP2040_WiFiNINA/RP2040_WiFiNINA_tcp.hpp index 865b66b4..9d7a75b8 100644 --- a/src/Tiny_Websockets_Generic/network/RP2040_WiFiNINA/RP2040_WiFiNINA_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/RP2040_WiFiNINA/RP2040_WiFiNINA_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/SAMD_EthernetENC/SAMD_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/SAMD_EthernetENC/SAMD_EthernetENC_tcp.hpp index 2943e3ef..b9871663 100644 --- a/src/Tiny_Websockets_Generic/network/SAMD_EthernetENC/SAMD_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/SAMD_EthernetENC/SAMD_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/SAMD_Ethernet_W5x00/SAMD_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/SAMD_Ethernet_W5x00/SAMD_Ethernet_W5x00_tcp.hpp index ac732147..ad217ad9 100644 --- a/src/Tiny_Websockets_Generic/network/SAMD_Ethernet_W5x00/SAMD_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/SAMD_Ethernet_W5x00/SAMD_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/SAMD_UIPEthernet/SAMD_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/SAMD_UIPEthernet/SAMD_UIPEthernet_tcp.hpp index 7c5309df..4d18436b 100644 --- a/src/Tiny_Websockets_Generic/network/SAMD_UIPEthernet/SAMD_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/SAMD_UIPEthernet/SAMD_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/SAMD_WiFi101/SAMD_WiFi101_tcp.hpp b/src/Tiny_Websockets_Generic/network/SAMD_WiFi101/SAMD_WiFi101_tcp.hpp index ec607a72..67f094e7 100644 --- a/src/Tiny_Websockets_Generic/network/SAMD_WiFi101/SAMD_WiFi101_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/SAMD_WiFi101/SAMD_WiFi101_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/SAMD_WiFiNINA/SAMD_WiFiNINA_tcp.hpp b/src/Tiny_Websockets_Generic/network/SAMD_WiFiNINA/SAMD_WiFiNINA_tcp.hpp index 0c3c935a..bfdf327e 100644 --- a/src/Tiny_Websockets_Generic/network/SAMD_WiFiNINA/SAMD_WiFiNINA_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/SAMD_WiFiNINA/SAMD_WiFiNINA_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/STM32_EthernetENC/STM32_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/STM32_EthernetENC/STM32_EthernetENC_tcp.hpp index e91524d9..a3a853d8 100644 --- a/src/Tiny_Websockets_Generic/network/STM32_EthernetENC/STM32_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/STM32_EthernetENC/STM32_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/STM32_Ethernet_W5x00/STM32_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/STM32_Ethernet_W5x00/STM32_Ethernet_W5x00_tcp.hpp index 9e5e588f..b1c4622b 100644 --- a/src/Tiny_Websockets_Generic/network/STM32_Ethernet_W5x00/STM32_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/STM32_Ethernet_W5x00/STM32_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/STM32_LAN8742AEthernet/STM32_LAN8742AEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/STM32_LAN8742AEthernet/STM32_LAN8742AEthernet_tcp.hpp index 6953aeca..b4e807f7 100644 --- a/src/Tiny_Websockets_Generic/network/STM32_LAN8742AEthernet/STM32_LAN8742AEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/STM32_LAN8742AEthernet/STM32_LAN8742AEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/STM32_UIPEthernet/STM32_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/STM32_UIPEthernet/STM32_UIPEthernet_tcp.hpp index e088b377..8d7037ad 100644 --- a/src/Tiny_Websockets_Generic/network/STM32_UIPEthernet/STM32_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/STM32_UIPEthernet/STM32_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/STM32_WiFiNINA/STM32_WiFiNINA_tcp.hpp b/src/Tiny_Websockets_Generic/network/STM32_WiFiNINA/STM32_WiFiNINA_tcp.hpp index 9eedf9d3..4a1d9284 100644 --- a/src/Tiny_Websockets_Generic/network/STM32_WiFiNINA/STM32_WiFiNINA_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/STM32_WiFiNINA/STM32_WiFiNINA_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Teensy41_NativeEthernet/Teensy41_NativeEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/Teensy41_NativeEthernet/Teensy41_NativeEthernet_tcp.hpp index 4ad8d706..f1f603d9 100644 --- a/src/Tiny_Websockets_Generic/network/Teensy41_NativeEthernet/Teensy41_NativeEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Teensy41_NativeEthernet/Teensy41_NativeEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Teensy41_QNEthernet/Teensy41_QNEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/Teensy41_QNEthernet/Teensy41_QNEthernet_tcp.hpp index cbbcbc6c..c49e170e 100644 --- a/src/Tiny_Websockets_Generic/network/Teensy41_QNEthernet/Teensy41_QNEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Teensy41_QNEthernet/Teensy41_QNEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Teensy_EthernetENC/Teensy_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/Teensy_EthernetENC/Teensy_EthernetENC_tcp.hpp index bc9e9075..127824f6 100644 --- a/src/Tiny_Websockets_Generic/network/Teensy_EthernetENC/Teensy_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Teensy_EthernetENC/Teensy_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Teensy_Ethernet_W5x00/Teensy_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/Teensy_Ethernet_W5x00/Teensy_Ethernet_W5x00_tcp.hpp index 403fe572..9f1739a1 100644 --- a/src/Tiny_Websockets_Generic/network/Teensy_Ethernet_W5x00/Teensy_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Teensy_Ethernet_W5x00/Teensy_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/Teensy_UIPEthernet/Teensy_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/Teensy_UIPEthernet/Teensy_UIPEthernet_tcp.hpp index d2cffd7c..bd09dce4 100644 --- a/src/Tiny_Websockets_Generic/network/Teensy_UIPEthernet/Teensy_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/Teensy_UIPEthernet/Teensy_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/esp32/esp32_tcp.hpp b/src/Tiny_Websockets_Generic/network/esp32/esp32_tcp.hpp index cfa1e21b..26b20e6e 100644 --- a/src/Tiny_Websockets_Generic/network/esp32/esp32_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/esp32/esp32_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/esp8266/esp8266_tcp.hpp b/src/Tiny_Websockets_Generic/network/esp8266/esp8266_tcp.hpp index 11265a6d..61a65efc 100644 --- a/src/Tiny_Websockets_Generic/network/esp8266/esp8266_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/esp8266/esp8266_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/generic_esp/generic_esp_clients.hpp b/src/Tiny_Websockets_Generic/network/generic_esp/generic_esp_clients.hpp index 1df458f2..99105105 100644 --- a/src/Tiny_Websockets_Generic/network/generic_esp/generic_esp_clients.hpp +++ b/src/Tiny_Websockets_Generic/network/generic_esp/generic_esp_clients.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/linux/linux_tcp_client.hpp b/src/Tiny_Websockets_Generic/network/linux/linux_tcp_client.hpp index b3f12be4..b81ba234 100644 --- a/src/Tiny_Websockets_Generic/network/linux/linux_tcp_client.hpp +++ b/src/Tiny_Websockets_Generic/network/linux/linux_tcp_client.hpp @@ -9,22 +9,6 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - - Version: 1.12.1 - - Version Modified By Date Comments - ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support - ... - 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples - 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface - 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 - 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency - 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet - 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 - 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet - 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/linux/linux_tcp_server.hpp b/src/Tiny_Websockets_Generic/network/linux/linux_tcp_server.hpp index 615e9869..eee9b919 100644 --- a/src/Tiny_Websockets_Generic/network/linux/linux_tcp_server.hpp +++ b/src/Tiny_Websockets_Generic/network/linux/linux_tcp_server.hpp @@ -9,22 +9,6 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - - Version: 1.12.1 - - Version Modified By Date Comments - ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support - ... - 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples - 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface - 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 - 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency - 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet - 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 - 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet - 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/nRF52_EthernetENC/nRF52_EthernetENC_tcp.hpp b/src/Tiny_Websockets_Generic/network/nRF52_EthernetENC/nRF52_EthernetENC_tcp.hpp index 73b5a71f..0752200b 100644 --- a/src/Tiny_Websockets_Generic/network/nRF52_EthernetENC/nRF52_EthernetENC_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/nRF52_EthernetENC/nRF52_EthernetENC_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/nRF52_Ethernet_W5x00/nRF52_Ethernet_W5x00_tcp.hpp b/src/Tiny_Websockets_Generic/network/nRF52_Ethernet_W5x00/nRF52_Ethernet_W5x00_tcp.hpp index 1ba582b3..fbef1e15 100644 --- a/src/Tiny_Websockets_Generic/network/nRF52_Ethernet_W5x00/nRF52_Ethernet_W5x00_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/nRF52_Ethernet_W5x00/nRF52_Ethernet_W5x00_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -24,7 +24,8 @@ 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ + 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once @@ -68,6 +69,8 @@ namespace websockets2_generic { typedef GenericEspTcpClient EthernetTcpClient; + ///////////////////////////////////////////////////// + #if 0 // KH, no SSL support for Ethernet class SecuredEthernetTcpClient : public GenericEspTcpClient @@ -98,6 +101,8 @@ namespace websockets2_generic } }; #endif + + ///////////////////////////////////////////////////// #ifndef WEBSOCKETS_PORT #define DUMMY_PORT 8080 @@ -107,11 +112,15 @@ namespace websockets2_generic // KH, quick fix for Ethernet port #define CLOSED 0 + + ///////////////////////////////////////////////////// class EthernetTcpServer : public TcpServer { public: EthernetTcpServer() : server(DUMMY_PORT) {} + + ///////////////////////////////////////////////////// bool poll() override { @@ -122,6 +131,8 @@ namespace websockets2_generic return true; ////// } + + ///////////////////////////////////////////////////// bool listen(const uint16_t port) override { @@ -134,6 +145,8 @@ namespace websockets2_generic ////// return available(); } + + ///////////////////////////////////////////////////// TcpClient* accept() override { @@ -156,6 +169,8 @@ namespace websockets2_generic return new EthernetTcpClient; } + + ///////////////////////////////////////////////////// bool available() override { @@ -167,6 +182,8 @@ namespace websockets2_generic //return (server); return true; } + + ///////////////////////////////////////////////////// void close() override { @@ -176,17 +193,26 @@ namespace websockets2_generic //server.close(); ////// } + + ///////////////////////////////////////////////////// virtual ~EthernetTcpServer() { if (available()) close(); } + + ///////////////////////////////////////////////////// protected: + + ///////////////////////////////////////////////////// + int getSocket() const override { return -1; } + + ///////////////////////////////////////////////////// private: EthernetServer server; diff --git a/src/Tiny_Websockets_Generic/network/nRF52_UIPEthernet/nRF52_UIPEthernet_tcp.hpp b/src/Tiny_Websockets_Generic/network/nRF52_UIPEthernet/nRF52_UIPEthernet_tcp.hpp index 24263c4c..e61e8037 100644 --- a/src/Tiny_Websockets_Generic/network/nRF52_UIPEthernet/nRF52_UIPEthernet_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/nRF52_UIPEthernet/nRF52_UIPEthernet_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/nRF52_WiFiNINA/nRF52_WiFiNINA_tcp.hpp b/src/Tiny_Websockets_Generic/network/nRF52_WiFiNINA/nRF52_WiFiNINA_tcp.hpp index 52a5b9cf..65ba294c 100644 --- a/src/Tiny_Websockets_Generic/network/nRF52_WiFiNINA/nRF52_WiFiNINA_tcp.hpp +++ b/src/Tiny_Websockets_Generic/network/nRF52_WiFiNINA/nRF52_WiFiNINA_tcp.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/tcp_client.hpp b/src/Tiny_Websockets_Generic/network/tcp_client.hpp index 3b59be5f..c2d8332a 100644 --- a/src/Tiny_Websockets_Generic/network/tcp_client.hpp +++ b/src/Tiny_Websockets_Generic/network/tcp_client.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/tcp_server.hpp b/src/Tiny_Websockets_Generic/network/tcp_server.hpp index 61fd1a41..f9e504a9 100644 --- a/src/Tiny_Websockets_Generic/network/tcp_server.hpp +++ b/src/Tiny_Websockets_Generic/network/tcp_server.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/tcp_socket.hpp b/src/Tiny_Websockets_Generic/network/tcp_socket.hpp index fa6266af..7d930885 100644 --- a/src/Tiny_Websockets_Generic/network/tcp_socket.hpp +++ b/src/Tiny_Websockets_Generic/network/tcp_socket.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/windows/win_tcp_client.hpp b/src/Tiny_Websockets_Generic/network/windows/win_tcp_client.hpp index f2cf03b3..460aee7a 100644 --- a/src/Tiny_Websockets_Generic/network/windows/win_tcp_client.hpp +++ b/src/Tiny_Websockets_Generic/network/windows/win_tcp_client.hpp @@ -9,22 +9,6 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - - Version: 1.12.1 - - Version Modified By Date Comments - ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support - ... - 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples - 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface - 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 - 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency - 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet - 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 - 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet - 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/network/windows/win_tcp_server.hpp b/src/Tiny_Websockets_Generic/network/windows/win_tcp_server.hpp index f10e58a6..3085d8b5 100644 --- a/src/Tiny_Websockets_Generic/network/windows/win_tcp_server.hpp +++ b/src/Tiny_Websockets_Generic/network/windows/win_tcp_server.hpp @@ -9,22 +9,6 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - - Version: 1.12.1 - - Version Modified By Date Comments - ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support - ... - 1.9.0 K Hoang 30/11/2021 Auto detect ESP32 core version. Fix bug in examples - 1.9.1 K Hoang 17/12/2021 Fix QNEthernet TCP interface - 1.10.0 K Hoang 18/12/2021 Supporting case-insensitive headers, according to RFC2616 - 1.10.1 K Hoang 26/02/2022 Reduce QNEthernet latency - 1.10.2 K Hoang 14/03/2022 Fix bug when using QNEthernet staticIP. Add staticIP option to NativeEthernet - 1.10.3 K Hoang 11/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040 - 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet - 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards - 1.12.1 K Hoang 09/10/2022 Fix bug in examples *****************************************************************************************************************************/ #pragma once diff --git a/src/Tiny_Websockets_Generic/server.hpp b/src/Tiny_Websockets_Generic/server.hpp index 93666469..1c8a46f8 100644 --- a/src/Tiny_Websockets_Generic/server.hpp +++ b/src/Tiny_Websockets_Generic/server.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _SERVER_HPP_ @@ -35,7 +36,8 @@ #include #include -// KH, from v1.0.1 +///////////////////////////////////////////////////// + #if (WEBSOCKETS_USE_ETHERNET || WEBSOCKETS_USE_PORTENTA_H7_ETHERNET) #if USE_UIP_ETHERNET // KH, from v1.0.2 @@ -69,20 +71,39 @@ #warning WEBSOCKETS_USE_ETHERNET in server.hpp #include #endif + +///////////////////////////////////////////////////// + +#elif WEBSOCKETS_USE_RP2040W + #warning WEBSOCKETS_USE_RP2040W in server.hpp + #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFININA #warning WEBSOCKETS_USE_WIFININA in server.hpp #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_WIFI101 #warning WEBSOCKETS_USE_WIFI101 in server.hpp #include + +///////////////////////////////////////////////////// + #elif WEBSOCKETS_USE_PORTENTA_H7_WIFI #warning WEBSOCKETS_USE_PORTENTA_H7_WIFI in client.hpp - #include + #include + +///////////////////////////////////////////////////// + #else #warning WEBSOCKETS_USE_ESP_WIFI in server.hpp #include #endif -////// + +///////////////////////////////////////////////////// namespace websockets2_generic { @@ -109,4 +130,6 @@ namespace websockets2_generic }; } // namespace websockets2_generic +///////////////////////////////////////////////////// + #endif // _SERVER_HPP_ diff --git a/src/Tiny_Websockets_Generic/ws_config_defs.hpp b/src/Tiny_Websockets_Generic/ws_config_defs.hpp index c2b8ecd4..228283c7 100644 --- a/src/Tiny_Websockets_Generic/ws_config_defs.hpp +++ b/src/Tiny_Websockets_Generic/ws_config_defs.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once diff --git a/src/WebSockets2_Generic.h b/src/WebSockets2_Generic.h index e5eb9965..73329f55 100644 --- a/src/WebSockets2_Generic.h +++ b/src/WebSockets2_Generic.h @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #pragma once @@ -32,13 +33,15 @@ #ifndef _WEBSOCKETS2_GENERIC_H #define _WEBSOCKETS2_GENERIC_H -#define WEBSOCKETS2_GENERIC_VERSION "WebSockets2_Generic v1.12.1" +///////////////////////////////////////////////////// + +#define WEBSOCKETS2_GENERIC_VERSION "WebSockets2_Generic v1.13.0" #define WEBSOCKETS2_GENERIC_VERSION_MAJOR 1 -#define WEBSOCKETS2_GENERIC_VERSION_MINOR 12 -#define WEBSOCKETS2_GENERIC_VERSION_PATCH 1 +#define WEBSOCKETS2_GENERIC_VERSION_MINOR 13 +#define WEBSOCKETS2_GENERIC_VERSION_PATCH 0 -#define WEBSOCKETS2_GENERIC_VERSION_INT 1012001 +#define WEBSOCKETS2_GENERIC_VERSION_INT 1013000 ///////////////////////////////////////////////////// @@ -46,7 +49,8 @@ #include "Tiny_Websockets_Generic/client.hpp" #include "Tiny_Websockets_Generic/server.hpp" -// KH, from v1.0.1 +///////////////////////////////////////////////////// + #include #include #include diff --git a/src/WebSockets2_Generic_Client.hpp b/src/WebSockets2_Generic_Client.hpp index 9ea8b9d1..e6ec892b 100644 --- a/src/WebSockets2_Generic_Client.hpp +++ b/src/WebSockets2_Generic_Client.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_CLIENT_H diff --git a/src/WebSockets2_Generic_Common.hpp b/src/WebSockets2_Generic_Common.hpp index 102f8857..4f387881 100644 --- a/src/WebSockets2_Generic_Common.hpp +++ b/src/WebSockets2_Generic_Common.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_COMMON_H diff --git a/src/WebSockets2_Generic_Crypto.hpp b/src/WebSockets2_Generic_Crypto.hpp index cabaa13d..ffef64a2 100644 --- a/src/WebSockets2_Generic_Crypto.hpp +++ b/src/WebSockets2_Generic_Crypto.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_CRYPTO_H diff --git a/src/WebSockets2_Generic_Debug.h b/src/WebSockets2_Generic_Debug.h index ab10bc96..fe41c96e 100644 --- a/src/WebSockets2_Generic_Debug.h +++ b/src/WebSockets2_Generic_Debug.h @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef WebSockets2_Generic_Debug_h @@ -34,12 +35,16 @@ #include +///////////////////////////////////////////////////// + #ifdef DEBUG_WEBSOCKETS_PORT #define WS_DBG_PORT DEBUG_WEBSOCKETS_PORT #else #define WS_DBG_PORT Serial #endif +///////////////////////////////////////////////////// + // Change _WEBSOCKETS_LOGLEVEL_ to set tracing and logging verbosity // 0: DISABLED: no logging // 1: ERROR: errors @@ -65,7 +70,6 @@ const char WS_SPACE[] = " "; /////////////////////////////////////// - #define LOGERROR(x) if(_WEBSOCKETS_LOGLEVEL_>0) { WS_PRINT_MARK; WS_PRINTLN(x); } #define LOGERROR0(x) if(_WEBSOCKETS_LOGLEVEL_>0) { WS_PRINT(x); } #define LOGERROR1(x,y) if(_WEBSOCKETS_LOGLEVEL_>0) { WS_PRINT_MARK; WS_PRINT(x); WS_PRINT_SP; WS_PRINTLN(y); } diff --git a/src/WebSockets2_Generic_Endpoint.hpp b/src/WebSockets2_Generic_Endpoint.hpp index c3fcfa46..ad51c8eb 100644 --- a/src/WebSockets2_Generic_Endpoint.hpp +++ b/src/WebSockets2_Generic_Endpoint.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_ENDPOINT_H diff --git a/src/WebSockets2_Generic_Message.hpp b/src/WebSockets2_Generic_Message.hpp index 63bff0ef..e462d730 100644 --- a/src/WebSockets2_Generic_Message.hpp +++ b/src/WebSockets2_Generic_Message.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_MESSAGE_H diff --git a/src/WebSockets2_Generic_Server.hpp b/src/WebSockets2_Generic_Server.hpp index 516cc766..b3f042dd 100644 --- a/src/WebSockets2_Generic_Server.hpp +++ b/src/WebSockets2_Generic_Server.hpp @@ -10,7 +10,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic Licensed under MIT license - Version: 1.12.1 + Version: 1.13.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -25,6 +25,7 @@ 1.11.0 K Hoang 08/10/2022 Add support to ESP32 using W5x00 Ethernet 1.12.0 K Hoang 09/10/2022 Add support to ENC28J60 using EthernetENC or UIPEthernet for all supported boards 1.12.1 K Hoang 09/10/2022 Fix bug in examples + 1.13.0 K Hoang 11/10/2022 Add support to RP2040W using CYW43439 WiFi *****************************************************************************************************************************/ #ifndef _WEBSOCKETS2_GENERIC_SERVER_H