How to send a long string with WebSocket #6398
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 1 comment
-
Posted at 2020-08-07 by user111618 And I tried to send data piece by piece, on "drain" event of the socket, but still got LOW_MEMORY error. Posted at 2020-08-07 by user111618 . Posted at 2020-08-07 by user111618 Here is the test data (short version):
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-08-07 by user111618
I had a problem with WebSocket when I try to send a long string(1688 Bytes in my case). I got error
"Execution Interrupted during event processing.
New interpreter error: LOW_MEMORY,MEMORY".
Then I modified the ws module, made the send function can accept a json object, to prevent string copy. But in another for loop, it still make a copy of source, I made comment down below.
I tried 5 methods(like using flash as buffer or turn source string in to array at first and exchange char in it in for loop) to fix it ,but none of them work.
I wish to use the second method to send data, but server will emit error "MASK must be set".
Anyone know how to deal with this? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions