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

refactor!: overhaul internal impl #55

Merged
merged 5 commits into from
Aug 6, 2024
Merged

refactor!: overhaul internal impl #55

merged 5 commits into from
Aug 6, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 2, 2024

This PR refactors crossws internal implementation to be more future-ready and web-compatible.

Changes (WIP):

  • Core crossws is rewritten as a (much faster) class
  • upgrade hook is first called on global and then resolved hook
  • The upgrade hook can return a standard web Response to abort (Allow upgrade hook to return custom response #16)
  • Added proxy stubs for Node (and UWS.js) for partial (web standard) request/response support
  • Bun integration needs an explicit upgrade header check to allow response abortions
  • Added additional tests for headers (incoming and response)
  • Support closeAll for Node.js adapter (subject to change before release mainly for tests)
  • Peers have standard, tested and consistent peer.headers and peer.url props.

@pi0 pi0 self-assigned this Aug 2, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 5, 2024

Deploying crossws with  Cloudflare Pages  Cloudflare Pages

Latest commit: d57cf40
Status: ✅  Deploy successful!
Preview URL: https://4d9a8008.crossws.pages.dev
Branch Preview URL: https://refactor-internal-overhaul.crossws.pages.dev

View logs

@pi0 pi0 marked this pull request as ready for review August 6, 2024 09:40
@pi0 pi0 merged commit 48a9d6d into main Aug 6, 2024
3 checks passed
@pi0 pi0 deleted the refactor/internal-overhaul branch August 6, 2024 09:41
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.

1 participant