I have a websocket proxy to TCP setup. But the data I receive is HEX buffer. How I can I convert it to string readable format? I think I have to set it to utf-8 but I don't see a option for that in websocket.
Example of data recevied:
Received: <Buffer 3c 63 72 6f 73 73 2d 61 69 6e 272 6f 2a 27 ... 46 more bytes>
Client code:
const ws = new WebSocket('ws://example.com:1211');
ws.onmessage = message => {
console.log('Received: ', message.data)
};