| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
- Update Java version from 1.7 to 17 for modern HTTP/3 support - Add comprehensive WebTransport integration test suite (12 test cases) - Add WebTransport configuration options in Manager.java - Add WebTransport fluent API methods in SocketOptionBuilder.java - Add WebTransport usage documentation and examples - Test WebTransport transport selection and fallback behavior - Test WebTransport with namespaces and multiple connections - Maintain full backward compatibility Features: - Transport selection testing (WebTransport-only and fallback scenarios) - Event handling integration with Socket.IO events - Configuration testing for WebTransport-specific options - Timeout handling and error scenario testing - Multiple connection and namespace support testing This PR enables Socket.IO Java client to support WebTransport through the Engine.IO client dependency and provides comprehensive testing for WebTransport integration scenarios.
- Remove outdated 'Temporarily commented out until correct dependencies are found' comments - Replace with clear comment explaining WebTransport support comes from Engine.IO client - These comments were from earlier attempts before implementing WebTransport in Engine.IO client
…tions
This commit simplifies WebTransport configuration to be consistent with other
transports (WebSocket, Polling) and removes the confusing dual-layer configuration
that was previously required.
### Changes Made:
**Removed Redundant Configuration Layer:**
- Removed WebTransportOptions class from Manager.Options
- Removed all WebTransport-specific setters from SocketOptionBuilder:
- setWebTransportOptions()
- setWebTransportEnabled()
- setWebTransportConnectTimeout()
- setWebTransportIdleTimeout()
- setWebTransportTrustAllCertificates()
- setWebTransportSslContext()
- setWebTransportCustomHeaders()
**Simplified Configuration Approach:**
- WebTransport now configured exactly like WebSocket and Polling
- Single configuration layer through Engine.IO transport options
- Consistent API across all transport types
**Updated Documentation:**
- Comprehensive WebTransport documentation with practical examples
- Clear explanation of transport-specific options for advanced use cases
- SSL configuration examples for development with self-signed certificates
- Emphasis on consistent configuration approach
- Updated webtransport_example.md with all new patterns
### Before (Confusing):
```java
// Dual-layer configuration - REMOVED
IO.Options options = IO.Options.builder()
.setWebTransportEnabled(true)
.setWebTransportConnectTimeout(30000)
.setWebTransportTrustAllCertificates(true)
.build();
```
### After (Consistent):
```java
// Simple, consistent with other transports
IO.Options options = IO.Options.builder()
.setTransports(new String[]{"webtransport", "websocket", "polling"})
.build();
// Advanced options when needed (same pattern as WebSocket/Polling)
Transport.Options webTransportOptions = new Transport.Options();
webTransportOptions.hostname = "127.0.0.1";
options.transportOptions.put("webtransport", webTransportOptions);
```
### Benefits:
- **Consistency**: WebTransport configured like other transports
- **Simplicity**: Single configuration approach, no dual layers
- **Maintainability**: Reduced code complexity and API surface
- **User Experience**: Intuitive configuration matching existing patterns
This change makes WebTransport a first-class transport that follows the same
patterns as WebSocket and Polling, eliminating confusion and reducing the
learning curve for developers.
Breaking Change: Removes WebTransport-specific configuration methods
Migration: Use .setTransports() and transportOptions like other transports
| Back | FazBrowse Home | New Git URL |
Add WebTransport Support to Socket.IO Java Client
This PR adds comprehensive WebTransport support to the Socket.IO Java client ecosystem, enabling modern HTTP/3-based real-time communication with automatic fallback to traditional transports.
🚀 Overview
WebTransport is a modern transport protocol based on HTTP/3 and QUIC that provides improved performance, reduced latency, and better handling of network conditions compared to traditional WebSocket connections.
This implementation provides production-ready WebTransport support with seamless fallback behavior.
📦 Changes Summary
Engine.IO Client (engine.io-client-java)
Socket.IO Client (socket.io-client-java)
🔧 Technical Implementation
Dependencies Added
Key Features
📋 Usage
🧪 Testing
🔄 Migration Guide
Before (Complex, Inconsistent)
After (Simple, Consistent)
✅ Compatibility
🎯 Benefits
🏗️ Architecture Improvements
📌 Notes
✅ This implementation provides a robust, production-ready WebTransport solution that gracefully falls back to traditional transports when WebTransport is unavailable, ensuring maximum compatibility and reliability for Socket.IO Java applications.