I just made some minor changes to your library, making it handle multiple connections somewhat better. Actually, when a new request arrives, the library now drops the old connection. So, again, you can only have one active client, but it does not fail when more than one requests occur.
Hope you like it,
Handling multiple connections by dropping the old one, when a new req…
Thank you! Much appreciated.
If a web page running a websocket client is reloaded many times, a frame longer than 64 chars may occure
When the Arduino server tries to close socket it stalls when writing to the client: "client.write((uint8_t) 0x08);"
I think, this could be caused by the lost ethernet connection. Therefore I added
before making the nice close.
Hope it makes sense for you.