Add WebSocket support to httpcore5-websocket#613
Add WebSocket support to httpcore5-websocket#613arturobernalg wants to merge 1 commit intoapache:masterfrom
Conversation
Improve server handling and add extensive core tests/examples Align client usage with core WebSocket APIs Extend HTTP/2 request conversion and tests
|
A follow‑up PR will expose the client‑side pieces (see https://github.com/apache/httpcomponents-client/pull/762/changes). |
|
@arturobernalg What is your plan? Do you want to provide the server side functionality out of the core project and the client side out of the client project? Should not the client protocol handler also go into core? |
@ok2c Plan is to keep server‑side WebSocket over H2 in core and client‑side in httpclient5. The client protocol handler is tied to the client execution stack and config, so it should stay in httpclient5. See apache/httpcomponents-client#762 |
|
@arturobernalg Interesting. How are you going to do integrations tests for the websocket protocol when it resides in two separate projects? The separation between core and client for HTTP protocol handlers is reasonably manageable: the message transport and the core protocol handling reside in core, advanced client functions reside in client. The core has integration tests that ensure correctness of the protocol handlers on both ends. in your case, I suspect the split into the server project and the client project will be hurting you in the long run. I do not know. This is your decision to make, but you may be better off having the server side websockets in the client project, at least for a few minor releases. |
Improve server handling and add extensive core tests/examples Align client usage with core WebSocket APIs
Extend HTTP/2 request conversion and tests
@ok2c DefaultH2RequestConverter has a minimal RFC 8441 change (handling :protocol for CONNECT). This is required for H2 WebSocket server support. I tried to keep it separated, but was impossible.