Skip to content

ws: store protocol context as connection meta data #17146

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

Closed
wants to merge 1 commit into from

Conversation

icing
Copy link
Contributor

@icing icing commented Apr 23, 2025

Eliminates union member on struct connectdata. Sample of how other procotols can handle their connection related data.

This avoids potential mix-ups of the proto union of a connection with other protocol instances.

Removed ws "disconnect" callback as meta data is automatically destroyed when a connection is destroyed.

Eliminates union member on struct connectdata. Sample of how
other procotols can handle their connection related data.

This avoids potention mix-ups of the `proto` union of a
connection with other protocol instances.

Removed ws "disconnect" callback as meta data is automatically
destroyed when a connection is destroyed.
@icing icing requested a review from bagder April 23, 2025 09:22
@icing
Copy link
Contributor Author

icing commented Apr 23, 2025

@bagder this is an idea which, if deemed good, could replace all those union members.

We could, for memory foot print, make a meta_hash that takes a fixed, static key and does no allocation. The number of meta keys we use is always fixed.

@bagder bagder closed this in daa0601 Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants