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

feat: Add HTTP/2 support for WebSocket #373

Merged
merged 11 commits into from
Jan 27, 2025
Merged

feat: Add HTTP/2 support for WebSocket #373

merged 11 commits into from
Jan 27, 2025

Conversation

0x676e67
Copy link
Owner

close: #369

@0x676e67 0x676e67 merged commit b46daa9 into main Jan 27, 2025
3 checks passed
@0x676e67 0x676e67 deleted the feat branch January 27, 2025 05:13
@0x676e67
Copy link
Owner Author

This pull request introduces several changes to the Cargo.toml file and multiple example files to incorporate the tracing library for logging, adds a new example for HTTP/2 WebSocket, and refactors the client request code to include protocol handling.

Dependency Updates:

  • Added tracing, tracing-subscriber, and env_logger dependencies to Cargo.toml to enhance logging capabilities.

Example Code Updates:

New Example:

  • Added a new example http2_websocket.rs to demonstrate WebSocket communication over HTTP/2, including setting up the client and handling messages.

Client Request Refactor:

  • Updated the Request struct and related methods to handle the new protocol field, allowing for better protocol management in client requests. [1] [2] [3] [4]
  • Modified http.rs to pass the protocol information when building requests, ensuring the correct protocol is used during execution. [1] [2] [3] [4]

WebSocket Enhancements:

  • Introduced a Ver enum in websocket/mod.rs to identify the version of the connection, supporting both HTTP/1 and HTTP/2. [1] [2]

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.

HTTP/2 support for WebSocket
1 participant