Allow binary-only and text-only websocket connects#851
Conversation
|
@jstarry How's this? As per my previous PR, this code works for me, but I'm happy to do more with guidance. |
|
Oh, one thing my previous PR did that I didn't do here is add a line of documentation to each of the binary-only formats mentioning that they are binary only. I'm guessing that such information, and a reference to |
|
Hey @ctm I'm re-opening this because a new use-case popped up here: https://gitter.im/yewframework/Lobby?at=5e2a4e904c3dae24f5daa58b Basically, it should be possible to use the "raw" Text or Binary with the websocket api |
|
@jstarry yesterday wound up being crazy hectic. Today and tomorrow should be better, but if not, I should be able to clean this up and resubmit on Monday. |
This allows the various formats (e.g., CBOR) that can't be converted in or out of Text to be used in a websocket by specifying you want to use a binary-only connection. A text-only connection is provided for symmetry.
|
FWIW, it rebased fine, so I've done a forced push so Travis can take a swing at it. I'm in a bit of a rush to get out the door, and then I'll be off the net for several hours, but I'll check back when I get in. As always, if there's more that you want me to do, let me know. |
|
Thanks @ctm! lgtm |
This allows the various formats (e.g., CBOR) that can't be converted in or out of Text to be used in a websocket by specifying you want to use a binary-only connection. A text-only connection is provided for symmetry.