SuperWebSocket icon indicating copy to clipboard operation
SuperWebSocket copied to clipboard

Switching to binary mode

Open KBeoughter opened this issue 12 years ago • 1 comments

When I open a SuperWebSocket client connection how do I switch from text to binary mode. With .Net WebSockets all I have to do is...

WebSocket.Options.SetRequestHeader("MessageType", "binary");

How do I do this with SuperWebSockets?

Note: The WebSocket server application I am talking to is not based on SuperWebSockets. It is located in another device and uses a version of the Mongoose WebSocket server.

KBeoughter avatar Jan 22 '14 12:01 KBeoughter

Kerry,

Turns out MessageType is something Mongoose uses to set the binary bit in a websocket header.

I figured out how to send "custom headers" using one of your alternate WebSocket constructors so Mongoose is now happy and sending the binary messages as I expected.

Ken

KBeoughter avatar Jan 22 '14 14:01 KBeoughter