Skip to content

refactor: improved and generalized API plus a variety of fixes#5

Merged
mccutchen merged 27 commits intomainfrom
updates
Dec 9, 2024
Merged

refactor: improved and generalized API plus a variety of fixes#5
mccutchen merged 27 commits intomainfrom
updates

Conversation

@mccutchen
Copy link
Owner

This is an unreviewable mess, but here are the highlights:

  • Revisit handshake API to make it easier to use correctly
  • Split websocket server API into low-level (Read/Write) and high level (Serve) implementations
  • Add connection lifecycle hooks for debugging/instrumentation
  • Fix various small protocol bugs and misunderstandings
    • Only validate UTF8 on full messages, not fragments
    • Don't require masking in low level proto impl, so it can be used to read in test clients
  • etc

Still lots to clean up and improve, but stopping here as a checkpoint before this gets even more unwieldy!

@codecov
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 76.99115% with 78 lines in your changes missing coverage. Please review.

Project coverage is 77.74%. Comparing base (bd84345) to head (2a0c663).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
proto.go 78.78% 30 Missing and 12 partials ⚠️
websocket.go 74.46% 26 Missing and 10 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
+ Coverage   76.36%   77.74%   +1.37%     
==========================================
  Files           1        2       +1     
  Lines         292      373      +81     
==========================================
+ Hits          223      290      +67     
- Misses         46       61      +15     
+ Partials       23       22       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mccutchen mccutchen enabled auto-merge (squash) December 9, 2024 15:26
@mccutchen mccutchen merged commit 6f40d29 into main Dec 9, 2024
@mccutchen mccutchen deleted the updates branch December 9, 2024 15:27
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