WebSocket Support
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] infrastructure changes
- [ ] Other... Please describe:
What is the current behavior?
What is the new behavior?
Other information
⚠️ No Changeset found
Latest commit: b726ad964aebf3f3713882978243d73f8b8454bf
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This is interesting. I have to admit I haven't thought much about this at all. Like what the ideal abstraction is?, how to expose it etc?.. I see this is a dedicated router which seems reasonable, but I'm going to need some more feedback to know what expectations are here. I don't know if @nksaraf has any thoughts. Might look at bringing this in as an experimental feature at first given us trying to lock down for 1.0.
Yes, it definitely is an experimental feature! I just wanted to allow people to start playing with it as soon as possible, since WebSockets are an important piece of modern web apps.
CrossWS seems very promising and runtime agnostic, similar to Nitro.
Related links:
- https://github.com/nksaraf/vinxi/issues/5
- https://github.com/unjs/crossws/issues/16
- https://github.com/unjs/nitro/issues/2171
- https://github.com/unjs/nitro/issues/678