khoih-prog / WebSockets2_Generic

A WebSocket Server and Client library for Arduino, based on RFC6455, for writing modern Websockets applications. Now support ESP8266, ESP32 (including ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00 / ENC28J60 / LAN8742A / LAN8720, ESP8266 / ESP32-AT modules/shields, as well as SINRIC / Alexa / Google Home
GNU General Public License v3.0
81 stars 30 forks source link

what is websocketclient if no incoming request? #41

Closed sdetweil closed 2 years ago

sdetweil commented 2 years ago

after

client = SocketsServer.accept();

after no incoming client connection request,

is it a single client object? only one client allowed at a time?

how can I push messages to the client asynchronously?

I would build an array of clients from accept and loop thru each for incoming messages, but send based on other events, data status change, elasped time....

khoih-prog commented 2 years ago

As this library based on the ArduinoWebsockets Library, just ported to many more boards besides the popular ESP32/ESP8266, I suggest that you test on the ESP32/ESP8266to see if there is the same issue / question.

If yes, please post the issue / question on the ArduinoWebsockets Library as I don't have time now to spend and deal / solve the basic original design of the library.

I also suggest that you have to include the Minimal, Reproducible Example, as no one can have the time/patience to read-the-tea-leaves to understand your issue and and recreate the whole test case.

We'd appreciate if you post the result / link here for we all to know the answer / solution.

Anyway, I'm closing this issue here as this is not a proven bug of the library yet and won't spend time to work on it.

Good Luck,

sdetweil commented 2 years ago

thanks. this was an info request. an issue type you dont provide.