I'm trying to mask a message ("hello") to send through WebSocket to a server.
I know that this should be masked. I want to know how to mask and how to send it when masked?
Is it simply just socket.send(masked array)
?
I'm trying to mask a message ("hello") to send through WebSocket to a server.
I know that this should be masked. I want to know how to mask and how to send it when masked?
Is it simply just socket.send(masked array)
?
Are you worried about the masking described in the data framing section of the protocol spec? If so, you shouldn't have to worry about this when using JavaScript. You can just call socket.send("hello") and rely on the browser masking the data appropriately for you.