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

Added WebSocketNonNegotiableExtensionBuilder #5

Merged
merged 6 commits into from
Nov 19, 2024

Conversation

adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Nov 17, 2024

For WebSocket extensions you want to apply without requiring negotiation with the other side.
Also split extension code up a bit so it is easier to read.

extensions: [
    .nonNegotiatedExtension {
        MyExtension()
    }
]

@adam-fowler adam-fowler requested a review from Joannis as a code owner November 17, 2024 13:33

let _build: @Sendable () -> Extension

init(_ build: @escaping @Sendable () -> Extension) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be public? Maybe people want to use non-negotiable extensions mixed with negotiable extensions

Copy link
Member Author

@adam-fowler adam-fowler Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can mix non-negotiable extensions with negotiable already eg

extensions: [
    .nonNegotiatedExtension { MyExtension() },
    .perMessageDeflate()
]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, I misunderstood how this was handled internally

@adam-fowler adam-fowler enabled auto-merge (squash) November 19, 2024 11:00
@adam-fowler adam-fowler merged commit 8f8dd9f into main Nov 19, 2024
5 checks passed
@Joannis Joannis deleted the non-negotiable-extensions branch November 19, 2024 11: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.

2 participants