Draft
Conversation
Implements WebSocket connections over HTTP/2 using the Extended CONNECT Protocol (RFC 8441). This enables WebSocket communication over HTTP/2 streams when using Fastify with http2: true option. Key changes: - Detect HTTP/2 servers and enable enableConnectProtocol setting - Intercept HTTP/2 stream events to handle WebSocket CONNECT requests - Create WebSocket instances over HTTP/2 streams with proper frame masking - Add client tracking support for HTTP/2 WebSocket connections - Handle both HTTP/1.1 upgrade and HTTP/2 CONNECT protocols - Ensure compatibility with existing HTTP/2 requests Test coverage: - Basic HTTP/2 WebSocket connection test - Multiple concurrent WebSocket connections over single HTTP/2 connection - Mixed HTTP/2 regular and WebSocket requests - Client tracking functionality Documentation: - Added HTTP/2 Support section to README.md - Included usage example with http2: true option - Referenced RFC 8441 specification Fixes #353
Member
Author
|
I'm not convinced we should support this due to websockets/ws#1458 |
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.
Summary
enableConnectProtocolws.setSocket()Test plan
test/http2.test.jsCloses #353