Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow binary-only and text-only websocket connects #851

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

ctm
Copy link
Contributor

@ctm ctm commented Jan 7, 2020

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.

@ctm
Copy link
Contributor Author

ctm commented Jan 7, 2020

@jstarry How's this? As per my previous PR, this code works for me, but I'm happy to do more with guidance.

@ctm
Copy link
Contributor Author

ctm commented Jan 7, 2020

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 connect_binary might be useful, and I meant to add them, but forgot.

@jstarry jstarry changed the title Allow binary-only and text-only websocket connects (#389) Allow binary-only and text-only websocket connects Jan 9, 2020
@jstarry
Copy link
Member

jstarry commented Jan 9, 2020

Closed in favour of #847. Thanks @ctm!

@jstarry jstarry closed this Jan 9, 2020
@jstarry jstarry reopened this Jan 24, 2020
@jstarry
Copy link
Member

jstarry commented Jan 24, 2020

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

@ctm
Copy link
Contributor Author

ctm commented Jan 25, 2020

@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.
@ctm
Copy link
Contributor Author

ctm commented Jan 25, 2020

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.

@jstarry
Copy link
Member

jstarry commented Jan 27, 2020

Thanks @ctm! lgtm

@jstarry jstarry merged commit a42cca3 into yewstack:master Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants