Skip to content

Commit

Permalink
ws over h2
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbai committed Jan 16, 2024
1 parent afe465b commit 6506727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/plugins/tls-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ TLS client stream.

The following plugins are [ALPN]-aware:

- [`ws-client`](./ws-client.md): `http/1.1` only
- [`ws-client`](./ws-client.md): `http/2` and `http/1.1` auto adaptive
- [`host-resolver`](./host-resolver.md): `h2` and `http/1.1` for DNS-over-HTTPS endpoints

## Revision History

- 2023-05-10: Added `alpn`.
- 2023-06-05: Specify auto-inferred `alpn`.
- 2024-01-16: Update `ws-client` with `http/2` support

[ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
3 changes: 2 additions & 1 deletion src/plugins/ws-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ WebSocket client.

## Details

Currently the WebSocket handshakes are based on HTTP/1.1 connections. Do not include `h2` in `alpn` when [`tls-client`](./tls-client.md) is used as the lower layer transport.
The WebSocket implementation is capable of initiating WebSocket requests over HTTP/2 when [`tls-client`](./tls-client.md) is used as the lower layer transport. In case the HTTP/2 connection handshake fails for any reason during the first connection attempt, HTTP/1.1 will be used for all subsequent requests.

Since the WebSocket protocol does not support half-closed connections, issues might occur for those user applications that rely on this feature.

## Revision History

- 2023-05-11: Added `ws-client`.
- 2024-10-16: Document WebSockets over HTTP/2

0 comments on commit 6506727

Please sign in to comment.