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

websocket::send() default callback #41

Closed
Tectu opened this issue Jul 2, 2021 · 2 comments
Closed

websocket::send() default callback #41

Tectu opened this issue Jul 2, 2021 · 2 comments
Labels
discussion General discussions

Comments

@Tectu
Copy link
Owner

Tectu commented Jul 2, 2021

In my opinion there are plenty of cases where one might want to send something through a websocket but not necessarily care about the callback. Currently, this requires the user to specify an empty callback handler.

@0x00002a what do you think about providing a default callback handler (an empty one) so a user might just do this:

conn->send(malloy::buffer("foo"));

instead of:

conn->send(malloy::buffer("foo"), [](auto, auto){});
@Tectu Tectu added the discussion General discussions label Jul 2, 2021
@0x00002a
Copy link
Contributor

0x00002a commented Jul 3, 2021

Agreed, that would be better. There does need to be a way to report errors though, I don't like the idea of letting the user easily (potentially accidentially even) ignore them, which I guess is more #40.

@Tectu
Copy link
Owner Author

Tectu commented Jul 8, 2021

I agree. Lets close this down as the future of this will mainly be dictated by the outcome of #40.

@Tectu Tectu closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussions
Projects
None yet
Development

No branches or pull requests

2 participants