-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket (WS_EVT_DATA) event from client does not update state on esp8266 only #307
Comments
Same with ESP32, it called with:
then again, with:
So, **info->len ** if a length of whole message, len is how many bytes was received this time, info->index is index of data received in message. I'm not sure what info->final is (both times it is 1, I expected it to be 0 in first chunk and 1 in last), but this function waits for complete message in one chunk, and cannot assemble message from two or more parts. I have added
just before onWSEvent function and modified its content:
so it can assemble message in separate buffer before deserialization in cost of memory usage. |
On esp8266 the event handler from file
is not passed the correct size_t len. As a result the if condition to proceed with updating the state is never executed. This works well on esp32 and I cannot figure out if its a library issue or not.
I have a json size 1365 characters but the len passed is 528.
The text was updated successfully, but these errors were encountered: