Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances clarity and consistency in WebSocket handler signatures and supporting documentation by replacing the older parameters (req, sid) with (data, client_id) and updating examples accordingly.
- Consolidated parameter names for WebSocket handlers across connection, disconnection, message, and registration events.
- Updated all relevant documentation and code examples, including blueprint examples and deprecation warnings.
- Simplified rate-limiting configuration by renaming a configuration parameter.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/src/content/docs/overview.md | Updated WebSocket handler signatures in code examples for consistent parameter naming |
| docs/src/content/docs/guides/websockets.md | Revised handler definitions and enhanced documentation with new parameter names and examples |
| docs/src/content/docs/guides/blueprint.md | Aligned blueprint examples with new WebSocket handler signatures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates WebSocket handler signatures and documentation to improve clarity and align with best practices. The changes replace the
reqandsidparameters withdataandclient_id, respectively, across all WebSocket handlers. Additionally, the documentation has been updated to reflect these changes and provide guidance on the new handler structure.Updates to WebSocket Handler Signatures:
req(WebSocketRequest object) withdata(message content) andsid(session ID) withclient_id(unique connection ID) in all WebSocket handler functions. This change applies to connection, disconnection, message handling, and registration handlers. ([[1]](https://github.com/twestos/Daebus/pull/18/files#diff-dc2f38725ac51f5eeb644431bee4f8b6f4a0a88a7eebfc10eeae63af68481f5bL129-R138),[[2]](https://github.com/twestos/Daebus/pull/18/files#diff-dc2f38725ac51f5eeb644431bee4f8b6f4a0a88a7eebfc10eeae63af68481f5bL382-R382),[[3]](https://github.com/twestos/Daebus/pull/18/files#diff-dc2f38725ac51f5eeb644431bee4f8b6f4a0a88a7eebfc10eeae63af68481f5bL512-R514),[[4]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L64-R127),[[5]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L100-R148),[[6]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L134-R171),[[7]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L294-R401),[[8]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L562-R672),[[9]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L589-R702),[[10]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L620-R744),[[11]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L677-R771),[[12]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L689-R789),[[13]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L712-R804),[[14]](https://github.com/twestos/Daebus/pull/18/files#diff-f96fbc5114a04cf997b180403f892d0e2b60d3bf3033d8ed52a9feb74f844caaL165-R166),[[15]](https://github.com/twestos/Daebus/pull/18/files#diff-f96fbc5114a04cf997b180403f892d0e2b60d3bf3033d8ed52a9feb74f844caaL268-R268))Documentation Enhancements:
dataandclient_idare used. ([docs/src/content/docs/guides/websockets.mdR35-R83](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63R35-R83))dataandclient_idparameters, ensuring consistency across the documentation. ([[1]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63R528-R549),[[2]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L492-R594),[[3]](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L514-R608))requestproxy. ([docs/src/content/docs/guides/websockets.mdL294-R401](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L294-R401))websocketslibrary, clarifying their impact and future resolution. ([docs/src/content/docs/guides/websockets.mdR854-R864](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63R854-R864))Minor Improvements:
messages_per_minutetomax_messagesfor clarity. ([docs/src/content/docs/guides/websockets.mdL395-R476](https://github.com/twestos/Daebus/pull/18/files#diff-d5d32e51c463b01e94723bbbe5b336a6dc20da1788f50950c9e9a841981b7f63L395-R476))