How to prevent websocket from truncating messages on encountering 0-byte? #1493
Unanswered
DaveTJones
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi Dave, you are sending data as text. If you send your data in the binary format then it should work fine. You define the data type when setting up your Websocket. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to set up a server-client pair for a novel cryptographic key generation protocol I'm working with, using a uWebSockets server and WASM client. Everything works well, barring instances where the char I'm sending contains a 0. In these cases the 0 is interpreted as a terminating null-byte and the remainder of the message does not send. Is there any way to escape these 0's, or to set the length of the message ahead of sending such that the whole message is sent independant of its contents?
Beta Was this translation helpful? Give feedback.
All reactions