You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using an esp32 (olimex esp32 gateway) as a websocket serve which a local html5 page connects to. Its wired via ethernet.
If the webpage crahes, I want it to reconnect on relaunch.
I'm using a flag to store the connection state of the websocket,
which is updated in the websocket event callback.
However these are not called on connection.
Serial.println("TEMP: connected"); is printing fine and javascript ws.onopen returns true.
Whats wrong?
How can I detect the websocket state here?
And another problem:
Sending from client (javascript) to server (esp32) works fine.
But if I send something from server to client it is rejected and returned as "�⸮Masked frame from server"
and javascript raises an error: 'ws://192.168.0.50/websocket' failed: A server must not mask any frames that it sends to the client.
It seems like you are setting the callbacks before you accept the client. The client that is returned from server.accept() and the one that is there before is not the same client. The callbacks are not saved.
Regarding the masking error message, this was addressed in the last patch. Can you make sure you are using the latest version?
Thank you for the issue, I am currently not marking it as a bug until you will be certain that this issue persists with the lastest version of the library. Also, I will be able to explain more in depth in a few days.
I believe this was resolved and is a usage error rather than a bug. Please let me know the status soon, otherwise I will close the issue due to inactivity.
Hello, I'm using an esp32 (olimex esp32 gateway) as a websocket serve which a local html5 page connects to. Its wired via ethernet.
If the webpage crahes, I want it to reconnect on relaunch.
I'm using a flag to store the connection state of the websocket,
which is updated in the websocket event callback.
However these are not called on connection.
Serial.println("TEMP: connected"); is printing fine and javascript ws.onopen returns true.
Whats wrong?
How can I detect the websocket state here?
The text was updated successfully, but these errors were encountered: