Skip to content

Uses Data inputs and outputs#11

Merged
NeedleInAJayStack merged 5 commits into
mainfrom
feat/data-centric-view
May 17, 2026
Merged

Uses Data inputs and outputs#11
NeedleInAJayStack merged 5 commits into
mainfrom
feat/data-centric-view

Conversation

@NeedleInAJayStack
Copy link
Copy Markdown
Member

This changes the Messenger, Server, and Client to operate on Data as opposed to String. This allows for optimizations like avoiding a Data <-> String conversion when using a WebSocket library that exposes passing and receiving text messages as a Data or ByteBuffers. It also better matches the paradigm that this package operates on encoded JSON, which in Swift is typically a Data type.

This also adjusts error behavior to avoid sending error messages as text frames in the format of "\(code): \(reason)", and removes the corresponding server handling. This was a holdover from using a WebSocket package that didn't expose passing a reason within a close frame.

Finally, it aligns error codes to match those listed in the spec.

@NeedleInAJayStack NeedleInAJayStack self-assigned this May 13, 2026
@NeedleInAJayStack NeedleInAJayStack force-pushed the feat/data-centric-view branch from b3235ac to efa0bb6 Compare May 13, 2026 06:29
Also change the error code enum to `internal` visibility
@NeedleInAJayStack NeedleInAJayStack force-pushed the feat/data-centric-view branch from efa0bb6 to 66e5edd Compare May 17, 2026 22:04
@NeedleInAJayStack NeedleInAJayStack changed the title Data Support Uses Data inputs and outputs May 17, 2026
@NeedleInAJayStack NeedleInAJayStack merged commit 2b3ff39 into main May 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant