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

feat(ws): support handleMessage option on ws.link #2236

Draft
wants to merge 4 commits into
base: feat/ws
Choose a base branch
from

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Aug 11, 2024

This pull request aims to accomplish a few things:

  1. Give the developer a clear API to modify the incoming/outgoing data in the WebSocket connection.
  2. Make the support for third-party bindings apply to the entire ws.link(), not individual connections (i.e. consistency).

Roadmap

Given that the binding requires more functionality (to return more functionality), perhaps a binding can ship multiple things: a custom handlMessage function to encoding/decoding, and something like extend() to provide new methods on the connection (or create new properties on the connection).

With this brief analysis, it looks like a single handleMessage option won't be enough to hook in a custom binding to your WebSocket connection. I may need to explore other means to provide a consistent, connection-wide API to augment the connection.

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