bryceg / Owin.WebSocket

A library for handling OWIN WebSocket connections
MIT License
47 stars 28 forks source link

question about type #14

Closed BrannonKing closed 9 years ago

BrannonKing commented 9 years ago

What is the purpose of the WebSocketMessageType enum, considering that all your send methods require byte data rather than a string type? If I'm forced to convert to UTF8 bytes, that's as good as binary in my mind. When would you use the enum? When would you use the "close" value of that enum?

I would assume that all packets on a given channel have the same Content-Type and Content-Encoding headers because HTTP would only send them with the initial connection. Is that right? What do you send for those values? I would like to be able to specify that my data is deflated UTF8 JSON.

BrannonKing commented 9 years ago

After reading the WebSocket spec I think I understand. I didn't realize it goes all the way down to the message headers.