WebSocket close under receiving invalid byte sequences error

#1

Hello everybody
I am developing an android application which uses WebSocket. I need to receive some messages which contain non-UTF8 characters.
Now I get the following error:
WebSockets Close recieved (1007 - A WebSocket text frame was recieved that could not be decoded to UTF-8 because it contained invalid byte sequences)
How can I solve this problem?
Thanks

0 Likes

#2

Use binary WebSocket messages (make your server send binary messages, not text).

/Tobias

ยทยทยท

Am 15.07.2014 13:42, schrieb Shiva Ketabi:

Hello everybody
I am developing an android application which uses WebSocket. I need to
receive some messages which contain non-UTF8 characters.
Now I get the following error:
WebSockets Close recieved (1007 - A WebSocket text frame was recieved
that could not be decoded to UTF-8 because it contained invalid byte
sequences)
How can I solve this problem?

0 Likes