-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
|
||
let _build: @Sendable () -> Extension | ||
|
||
init(_ build: @escaping @Sendable () -> Extension) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()
]
There was a problem hiding this comment.
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
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.