-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
Support for subscribe and publish Websocket API in Bun Adapter #3230
Labels
enhancement
New feature or request.
Comments
newarifrh
changed the title
Support for subscribe and publish API in Bun Adapter
Support for subscribe and publish Websocket API in Bun Adapter
Aug 4, 2024
It is capable without Bun, so I think that it's good that Hono will provide this API for all runtime as utils. |
Yes, I agree with that. However, I haven't seen if there are native APIs for other adapters. So far, I have been able to work for Bun adapter using native API. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the feature you are proposing?
Description
Currently, Hono.js's WebSocket helper provides several adapters, one of which is Bun. However, the Bun adapter only supports the
send()
API. According to the Bun WebSocket documentation, there are other useful APIs likesubscribe
andpublish
. These APIs can be used to send data/messages to users subscribed to the same topic. With the currentsend()
API, messages have to be sent in a loop which is not efficient for broadcasting messages.Use Case
Proposal
subscribe
andpublish
APIs in the Bun adapter.Benefits
References
The text was updated successfully, but these errors were encountered: